Git notes and comparision with svn

Posted on 03 Şubat 2015 in Programlama by

A good git tutorial
https://www.atlassian.com/git/tutorials/

and another one
http://git-scm.com/book/en/v2/

Git notes.
What are the use cases for staging?


When you commit it’s only going to commit the changes in the index (the “staged” files). There are many uses for this, but the most obvious is to break up your working changes into smaller, self-contained pieces. Perhaps you fixed a bug while you were implementing a feature. You can git add just that file (or git add -p to add just part of a file!) and then commit that bugfix before committing everything else. If you are using git commit -a then you are just forcing an add of everything right before the commit. Don’t use -a if you want to take advantage of staging files.

You can also treat the staged files as an intermediate working copy with the –cached to many commands. For example, git diff –cached will show you how the stage differs from HEAD so you can see what you’re about to commit without mixing in your other working changes.

The other really common use is for when some of your changes should never be committed; for example, you can stage the good stuff, commit it, then blow away the bad stuff with git reset --hard

Example git flow

Following diagram is taken from : http://nvie.com/posts/a-successful-git-branching-model/

git-model@2x

 

Some git commands:

Show commits that are not pushed:

git diff –stat origin/<branch_name>

Please give us your valuable comment

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image

This site uses Akismet to reduce spam. Learn how your comment data is processed.