Many tips I have been learning to use GIT
nicky$: file="filepath" nicky$: git checkout $(git rev-list -n 1 HEAD -- "$file")^ -- "$file"
To ignore files, create a file named .gitignore inside the root directory of your project:
nicky$: touch .gitignore
Afterwards, fill up the file with for example:
*.exe #Every file that has this extension won't be commited *.msi *.log *.pdb [B][b]in/ #Ignore all files of bin directory that starts either by Bin/bin [B][b]in/* #Ignore all subfolders of bin directory
Then
nicky$: git add . nicky$: git commit -m “Add ignore file”
If it is not take into account, you can reset the git cache:
nicky$: git rm -r –cached .
Note: before the word cached, there are two -
$ git ls-remote --heads origin