User Tools

Site Tools


tutorials:git-tips

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

tutorials:git-tips [2014/04/04 18:55]
razvan created
tutorials:git-tips [2020/07/20 09:16]
Line 1: Line 1:
-= Git = 
  
-GitHub's [[http://learn.github.com/p/intro.html|introduction to Git]] is a good tutorial for starters. [[http://gitimmersion.com/|Git Immersion]] is another good git tutorial. Read them to get a grasp of the paradigms behind Git. 
- 
-Read [[http://techblog.rosedu.org/git-good-practices.html|this article]] for a basic set of Git best practices. 
- 
-Make small commits; make descriptive commit messages. Read more [[http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html|here]]. 
- 
-Do not commit files that may be obtained from files already in the repository. Do not commit object files or executable files that are compiled out from source code files. You may commit images files or other binary files that can't be obtained from source code files inside the repository. 
- 
-Merge and rebase are two sometimes misunderstood methods of adding commits using git. [[http://blog.experimentalworks.net/2009/03/merge-vs-rebase-a-deep-dive-into-the-mysteries-of-revision-control|This blog post]] offers some insight into the matter. If you have commits that you haven't pushed yet and want to bring yourself up to date, always use ''%%git pull --rebase%%'' to pull new commits. Not doing so will keep the old head as a parent commit for your (yet un-pushed) commits. Pushing that into the main repository will have the nasty side effect of turning it into a branch/merge Christmas tree, which is something we want to avoid at all costs. 
- 
-Make sure there aren't any trailing whitespaces in your file. The waste space; Git usually complains about this when you create a commit. 
- 
-The Windows OS has the habbit of using executable permissions for files such as source code or text files. These don't required executable permissions and you should make sure they don't use them. 
- 
-For more in depth tips, read the "Git is the Answer" series: 
-  * http://techblog.rosedu.org/git-is-the-answer-1.html 
-  * http://techblog.rosedu.org/git-is-the-answer-2.html 
-  * http://techblog.rosedu.org/git-is-the-answer-3.html 
tutorials/git-tips.txt · Last modified: 2020/07/20 09:16 (external edit)