Reputation: 1354
I'm using git for the first time to manage a collaborate LaTeX project. I have set up a local git repository, and committed it to bitbucket using ssh. So far, all good.
My collaborator has never used git either, and has asked me for advice. I know he can clone the repository. But I don't know if the repository, once cloned, is automatically tracked by git. So what I need to know is: what do I tell my collaborator for him to have the repository on his local computer set up in such a way as to be automatically tracked by git, and so that he can commit changes whenever he makes them?
Upvotes: 0
Views: 168
Reputation: 11
To answer your question: Tell him, if he did a clone of your repository, he can also commit locally to track his changes. But to send you the changes he has to use git push
. And he gets your changes as updates by using git pull
.
You said "automatically". To be clear here: Git is tracking but you need to commit your changes locally by using the git commit
command.
If you want him to be able to send you his changes, you need to give him write permission to the repo on Bitbucket and he has to push the changes up to bitbucket after committing them locally.
git commit
is local.
git push
command sends changes to an remote location.
see also git-remote and git-push
If he cloned from bitbucket, git remote -v
should show bitbucket as origin. Then a simple git push should work. If git remote -v
does not show the origin, check adding a remote
Upvotes: 1