What is git init
for exactly? Must I do it once per computer or once per project that uses git? I downloaded my project by git clone
and got it working
@Jaanus just one addition to what @slebetman explained regarding git pull
. It's not exactly syncing but rather fetching the commits which are not on your local. This is more of a corner case, consider the following -
Assuming to be dealing with a branch test_branch. A, B and C commits exist for origin/test_branch
(the branch on your git server) where C is the most recent commit. You have taken a pull and now have A, B and C on your local branch too.
Let's say for some reason you had to reset the commit B and force re-write history of origin/test_branch
leaving the history to be A and C.
Now when you perform git pull
onto your local. It is going to say everything already up to date
but notice you have additional changes of commit B. Therefore, do not consider this as a sync operation but more of a get what I don't have
operation.
Hope that was helpful.