yet another git quickstart

I heard a lot about git, the “new” version control system, and i decided to try it for one of my floss project.

Git main advantage is the capability of manage multiple source repositories at the same time. So let’s start

1- jon creates a local repository
# git init myproject/
# git add myproject/*.py
# git commit -m “first import”
2- jon copies his local repository to a remote server
# git clone myproject/ ssh://git.code.sf.net/p/myproject/git.git
2.1- define the remote repository as the master one
# git remote add origin ssh://git.code.sf.net/p/myproject/git.git

3- mary checks out from the remote server
# git clone ssh://git.code.sf.net/p/myproject/git.git myproject/

4- jon modifies his files and commit to the local repo
# touch myproject/README
# git add myproject/README
# git commit myproject -m “added README file”
4.1 – commit (aka push) changes to a remote server he sets as master
# git push origin master:refs/heads/master

5- mary updates from the remote server
# git pull ssh://git.code.sf.net/p/myproject/git.git

Lascia un commento