Home
People
Projects
Research
Publications
Surveys
Courses
Student Projects
Jobs
Downloads
This is an old revision of the document!
Git is an extremely powerful and flexible revision control system, and using it effectively requires adherence to conventions.
Here is a proposal; comments and adjustments are welcome.
cd PROJECT-ROOT git init --shared git add . git commit -m "initial import"
Then, ask the sysadmin to put your tree onto the lab server.
If your tree will not be accessed by anybody else, there is no need to talk to the sysadmin or to specifiy –shared
.
To get the source code initially use git clone
:
git clone ssh://iis.uibk.ac.at:2222/projects/git/PROJEKTNAME LOCALREPO
e.g.
git clone ssh://iis.uibk.ac.at:2222/projects/git/FeatureHierarchies
Develop locally, within your own trees, and push (or request to pull) only generally-useful, tried-and-proven patch sets into the main tree.
for local commits use just something like
git commit -a -m "Commit Message"
Generate Patches and use Peer-to-peer patch exchanges 1)
git format-patch --cover-letter -o some-dir d8a285c8f83f728be2d056e6d4b0909972789d51..9202ec15da36ca060722c363575e0e390d85fb71 # this is equivalent to, this is the short form git format-patch --cover-letter -n -o some-dir d8a28..9202e
Where d8a28 was the last commit before you started hacking and 9202e is the current head, meaning the commit ID of your latest commit.
For renaming files add “-M” to the git-format-patch arguments then patches wont create removals and adds for a simple rename.
Sending Patches:
git send-email --no-chain-reply-to --from "My Name <my.name@uibk.ac.at>" --to recipient@domain some-directory/
push the local commits to the server (master tree) - as mentioned above only generally-useful, tried-and-proven code.
git push origin master
to get updates from the server
git pull origin master
howto think like git: http://gitref.org/
this may also be a good starting point: http://www.kernel.org/pub/software/scm/git/docs/everyday.html