Reputation: 122
So if I do a git push and commit, does the file get saved to my local hdd (like on my computer)?
I wonder because I got a grade on a project saying some things weren't working. They were for me though, so it seems even though I pushed right before submission, the files on the hdd were not updated, so the modifications were not in the submission.
Upvotes: 0
Views: 1486
Reputation: 4559
git commit
will create a commit object stored into your local git repository (which is usually is .git
). It will also update the ref that is your local branch to point to the new commit.
git push
will attempt to cause a remote repository's branch to match your local branch. It does this by sending all relevant commits that the remote doesn't already have. The remote's branch will then point to the same commit that your local branch points.
Upvotes: 4
Reputation: 8557
Git push, commit and does everything on files which are saved already. You can't push file which in during editing.
So git doesn't save files.
Upvotes: 2