Git cheat sheet

Nice history log in console git log --all --decorate --oneline --graph How to remember: "A Dog" = git log --all --decorate --oneline --graph Sample result: $ git log --all --decorate --oneline --graph * e4689e3 (HEAD -> master, origin/master, origin/HEAD) tree iteration * 4c3385d using stoi * 0588a47 gitignore for cpp * 8f3f0e6 removed boost, add readme * f225b06 simple expression interpreter * 1ccdda1 chain of responsibility * f37eb7a restructure of the old code, removed large db file | * 3bfdf78 (tag: 0....

April 7, 2020 · SergeM

Pretty git history with branches in command line

Show git history with branches git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all Less nice and shorter git log --graph --abbrev-commit --decorate --oneline --all See also: Git cheat sheet

January 28, 2017 · SergeM

Temporary files format that can be deleted from project of Visual Studio 2010

Add to .gitignore: *.ipch Debug Release *.sdf - The SDF file is your code browsing database which uses SQL Sever Compact Edition. You don’t need to copy this SDF file while you move your project, and it will be automatically populated in the new location once you open your project. [[1](http://social.msdn.microsoft.com/Forums/en-US/20fee924-e267-4c1a-b0fe-3321f86e1bb5/sdf-file?forum=vcprerelease" target="_blank)] [[2](http://social.msdn.microsoft.com/Forums/vstudio/en-US/1ef46540-e4b8-4779-8403-49239bc3f7ee/is-it-safe-to-delete-ipch-folder-precompiled-headers?forum=vcgeneral" target="_blank)]

January 14, 2014 · SergeM

Migrating from SVN to Git and Mercurial

There is a lot of answers here: http://stackoverflow.com/questions/79165/how-to-migrate-svn-with-history-to-a-new-git-repository I found rather useful [this one](http://stackoverflow.com/a/9316931" target="_blank). A guy made a script according to proposed instructions: https://github.com/onepremise/SGMS This script will convert projects stored in SVN with the following format: /trunk /Project1 /Project2 /branches /Project1 /Project2 /tags /Project1 /Project2 This scheme is also popular and supported as well: /Project1 /trunk /branches /tags /Project2 /trunk /branches /tags Each project will get synchronized over by project name:...

January 8, 2014 · SergeM