Difference between revisions of "Git Howto"

From HallCWiki
Jump to: navigation, search
m
Line 8: Line 8:
 
Git is similar to CVS, SVN, etc. but the cheap local branching make it feasible to use a very powerful workflow where you can checkout, try something, backup, test something different, switch back to attempt 1 -- all without losing any of your work.  You can also easily merge between these different branches and push-pull pieces of commits from others.  It is ideal for the kind of highly distributed development we do at JLab.
 
Git is similar to CVS, SVN, etc. but the cheap local branching make it feasible to use a very powerful workflow where you can checkout, try something, backup, test something different, switch back to attempt 1 -- all without losing any of your work.  You can also easily merge between these different branches and push-pull pieces of commits from others.  It is ideal for the kind of highly distributed development we do at JLab.
  
Some general links to help users come up to speed with git.
+
 
 +
== Some general links to help users come up to speed with git. ==
 +
 
 
* [http://git-scm.com/about/ About git] A quick read on what makes git different, and why you should care.
 
* [http://git-scm.com/about/ About git] A quick read on what makes git different, and why you should care.
 
* [http://teamtreehouse.com/blog/why-you-should-switch-from-subversion-to-git Why You Should Switch from Subversion to Git]: This article lays out the differences between git and svn/cvs.  Comments for and against are interesting too.
 
* [http://teamtreehouse.com/blog/why-you-should-switch-from-subversion-to-git Why You Should Switch from Subversion to Git]: This article lays out the differences between git and svn/cvs.  Comments for and against are interesting too.
Line 18: Line 20:
 
* [https://github.com/training/free Free GitHub Class]: GitHub runs these web seminars every few weeks.  Keep an eye out for a seminar that you might find interesting and sign up.
 
* [https://github.com/training/free Free GitHub Class]: GitHub runs these web seminars every few weeks.  Keep an eye out for a seminar that you might find interesting and sign up.
 
* [http://schacon.github.com/git/everyday.html Everyday GIT With 20 Commands Or So]:  Nice site that walks through some "typical" development tasks.
 
* [http://schacon.github.com/git/everyday.html Everyday GIT With 20 Commands Or So]:  Nice site that walks through some "typical" development tasks.
*[http://ndpsoftware.com/git-cheatsheet.html Interactive cheatsheet] for Git.
+
* [http://ndpsoftware.com/git-cheatsheet.html Interactive cheatsheet] for Git.
 +
 
 +
 
 +
== Tweaks:  ==
 +
* Add the current git branch to your bash prompt
 +
** Save [[git-prompt.sh]] to '~/bin/git-prompt.sh' under your account
 +
** Edit your ~/.bashrc file and add this line some where towards the end
 +
  [ -r ~/bin/git-prompt.sh ] && source ~/bin/git-prompt.sh
  
  
 
<font color=red>'''NOTE:''' If you find a resource that you really appreciate. ''PLEASE ADD IT TO THE LIST!''<font>
 
<font color=red>'''NOTE:''' If you find a resource that you really appreciate. ''PLEASE ADD IT TO THE LIST!''<font>
 
[[category:12GeV Software]]
 
[[category:12GeV Software]]

Revision as of 16:26, 3 January 2013

From the git homepage:

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Git is easy to learn and has a tiny footprint with lightning fast performance. It outclasses SCM tools like Subversion, CVS, Perforce, and ClearCase with features like cheap local branching, convenient staging areas, and multiple workflows.

Git is similar to CVS, SVN, etc. but the cheap local branching make it feasible to use a very powerful workflow where you can checkout, try something, backup, test something different, switch back to attempt 1 -- all without losing any of your work. You can also easily merge between these different branches and push-pull pieces of commits from others. It is ideal for the kind of highly distributed development we do at JLab.


Some general links to help users come up to speed with git.


Tweaks:

  • Add the current git branch to your bash prompt
    • Save git-prompt.sh to '~/bin/git-prompt.sh' under your account
    • Edit your ~/.bashrc file and add this line some where towards the end
 [ -r ~/bin/git-prompt.sh ] && source ~/bin/git-prompt.sh


NOTE: If you find a resource that you really appreciate. PLEASE ADD IT TO THE LIST!