This is mainly for command line in Github.

If you have been working on a project, you may want to store it to Github.
After making a commit, set the remote repository destination.

git remote add origin <github repo url>
- This tells Git where the remote repository is and gives it an alias of "origin".
- To check the remote repository is correct run;
got remote -v

Now push your local repository to the Github repository.

git push origin master
- This pushed the local master branch to the remote repo called "origin"

NOTE: The local project name does not have to match the remote project name.
This means you can push your branch into any other project in Github without having to match names!

  • development/github.txt
  • Last modified: 2018/05/25 13:05
  • (external edit)