Posts Tagged ‘git’

To compare the last 2 commits in git in a single command, we need to connect the following commands with pipe. git log which lists the commit logs of the git repository, grep commit which gets the lines with the string “commit”, cut -d ” ” -f2 which gets the second column, using a space [...]

Sunday, September 26th, 2010 at 14:13 | Comments Off
Categories: computer, Linux, vcs
Tags:

To show deleted files in a git work directory: git ls-files -d To restore the deleted files: git ls-files -d | xargs git checkout –

Sunday, September 26th, 2010 at 13:59 | Comments Off
Categories: computer, Linux, vcs
Tags:
TOP