Advertisement
asanchez75

git

Mar 21st, 2012
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.50 KB | None | 0 0
  1. http://www.artandlogic.com/blog/2014/01/git-cheat-sheet/
  2. git show-ref --tags --abbrev
  3. ===========================================================================
  4. http://stackoverflow.com/questions/1404796/how-to-get-the-latest-tag-name-in-current-branch-in-git
  5. ===========================================================================
  6. git describe --abbrev=0 --tags
  7. ===========================================================================
  8. http://stackoverflow.com/questions/1862423/git-how-to-tell-which-commit-a-tag-points-to
  9. git show-ref $TAG
  10. ===========================================================================
  11. Synchronize our local branches with all remote branches , if find that remote branch is removed, then remove this branch locally
  12.  
  13. git remote update --prune
  14.  
  15. Create a branch based on commit
  16.  
  17. git branch 7.x-1.x d0ea9c6
  18.  
  19.  
  20. http://stackoverflow.com/questions/1064361/unable-to-show-a-git-tree-in-terminal
  21.  
  22. git tree
  23. A solution is to create an Alias in your .gitconfig and call it easily
  24. [alias] tree = log --graph --decorate --pretty=oneline --abbrev-commit
  25.  
  26. git config alias.lol 'log --pretty=oneline --abbrev-commit --graph --decorate'
  27. http://stackoverflow.com/questions/1862423/git-how-to-tell-which-commit-a-tag-points-to
  28. http://mislav.uniqpath.com/2010/07/git-tips/
  29. http://snarvaez.com.ar/libertad/index.php/2009/01/22/git-sistema-de-versionado-rapido-y-distribuido/
  30.  
  31. ==================================================================================
  32.  
  33. http://adventuresincoding.com/2010/04/how-to-setup-git-to-use-diffmerge
  34.  
  35. Visual Mergetool Configuration====
  36.  
  37. git config --global merge.tool diffmerge
  38.  
  39. git config --global mergetool.diffmerge.cmd "diffmerge --merge
  40. --result=\$MERGED \$LOCAL \$BASE \$REMOTE"
  41.  
  42. git config --global mergetool.diffmerge.trustExitCode true
  43.  
  44. Don’t store backups====
  45.  
  46. git config --global mergetool.keepBackup false
  47.  
  48. Visual Difftool Configuration===
  49.  
  50. git config --global diff.tool diffmerge
  51. git config --global difftool.diffmerge.cmd "diffmerge \$LOCAL \$REMOTE"
  52. ===================
  53.  
  54. git difftool 71c8c69 b8ca6fe nice_menus_ana.css
  55.  
  56. =====================================================================
  57. http://stackoverflow.com/questions/373812/rollback-file-to-much-earlier-version
  58.  
  59. git checkout <commit hash> file
  60. git checkout 71c8c69 nice_menus_ana.css
  61.  
  62.  
  63. git checkout <commit hash> file
  64. git commit -a
  65.  
  66. git checkout f54d635 sites/all/modules/custom/boletin/boletin.module
  67.  
  68. ====================
  69. deshaceer cambios
  70. git reset --hard ORIG_HEAD
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement