and <code>local_directory</code> will contain an up-to-date project.
<divclass="encadre"><em>
You should make this operation also on the computer used to create the repository. Just to verify all will be okay.
</em>
</div>
newcorps
## The workflow
To resume you now have one repository on the Internet, and one or many computer associated with it. Now, what you want is to synchronize everything.
Before begining your work, the first thing to do is to get all modification from the Internet to your local host:
<div>
<codeclass="zsh">
git pull
</code>
</div>
After that you can do (many times):
<div>
<codeclass="zsh">
hack, hack, hack...
git add some files
git commit
</code>
</div>
When you want your local modification to be on the Internet just do a simple:
<div>
<codeclass="zsh">
git push
</code>
</div>
All should be ok.
If you have some trouble with the <code>push</code> and <code>pull</code> verify your <code>.git/config</code> file ; it should contain the following lines:
<div>
<codeclass="zsh">
...
[remote "origin"]
url = protocol://url/of/the/repository
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
...
</code>
</div>
## Branches Synchronisation
Well, now, all seems ok, but you have to worry about two little things. Git is all about decentralisation and branches. It is very easy to manage one branch, or many branches on the same host. But synchronize branches on many hosts is not a natural operation.
This is why I created two simple scripts to automate this. One for creating a branch locally and remotely. And one to get remotely created branched on your local host.
Then when you want to create a new branch (locally and remotely) ; you simply have to do a: