What is the proper terminal command to update a GitHub repository whose files are stored locally on my Mac machine?
Asked
Active
Viewed 209 times
1 Answers
1
git push <remote> <branch>
. For example:
git push -u origin master
If you haven't yet set up a remote, add one using git remote add <name> <uri>
. For example:
git remote add origin https://github.com/username/example.git

Ry-
- 218,210
- 55
- 464
- 476
-
I'm getting this response when using git remote add origin
"Not a git repository (or any of the parent directories): .git" even though I have successfully pushed code to a repo.. – Apollo Jul 28 '12 at 02:52 -
@Derek: Are you in `.git`? Try `cd`ing to the parent folder before using `remote add`. (And I'm not quite sure how to answer that first question... `:D`) – Ry- Jul 28 '12 at 02:53
-
perfect, there we go. Thanks so much for your help. And yea, no need to answer the first question :) – Apollo Jul 28 '12 at 02:54
-
hey sorry to bother you but I actually just tried this command and it doesn't seem to update my files correctly on the repo even though it produces this response: Branch master set up to track remote branch master from origin. Everything up-to-date – Apollo Jul 28 '12 at 03:36