After using git to locally track a project, how can I add it to GitHub?
You can use projects on GitHub to plan and track the work for your team. A project is a customizable spreadsheet that integrates with your issues and pull requests on GitHub, automatically staying up-to-date with the information on GitHub.
GitHub gives you instructions after you've created the repository online.
cd
to the directory with the local repository
git remote add origin whatever-address-my-repository is.git
to set the remote
then make a commit, and push to the master branch.
git push -u origin master
https://help.github.com/articles/create-a-repo
1.Create a README.md
in your local repo (for GitHub -*optional
)
2.git remote add origin <your_URL_for_github_repo.git>
(You can verify you have origin
by entering git remote -v
. You could see <URL>.git
as the origin
).
3.Make a commit by git commit -a -m "<a message>"
(Important! Only committed files will be pushed to Github)
4.Now push to GitHub by git push -u origin master
(If you pushing the master branch).
You will be needing passwords every time you push (If you cloned using https:
).For get rid of that ;
In Terminal, enter the following:
git config --global credential.helper cache # Set git to use the credential memory cache
To change the default password cache timeout, enter the following:
git config --global credential.helper 'cache --timeout=3600' # Set the cache to timeout after 1 hour (setting is in seconds)
Here you will find the steps about how to create a repository and how to push it on Github: http://programertools.blogspot.com/2014/04/how-to-use-github.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With