Posts in 2020
-
Git Add
Friday, October 30, 2020 in Git
Categories:
less than a minute
Git Version 2.x Command New File Modified File Deleted File Summary git add -A Y Y Y Stage new, modified, deleted git add . Y Y Y Stage new, modified, deleted git add --ignore-removal . Y Y N Stage new and modified files (Deleted files not staged) …
Posts in 2019
-
Remove Files From Git Repo as in Gitignore
Wednesday, May 15, 2019 in Git
Categories:
less than a minute
After you committed/pushed files to GIT repository, if you decide to ignore some files/directories using .gitignore then they won’t be automatically removed from git repository. Following command can be used for removing those ignored files …
Posts in 2017
-
Git Squash
Friday, November 10, 2017 in Git
Categories:
less than a minute
Option 1 to squash last two commits git rebase -i HEAD~2 This will open editor where you can choose which commit to keep and which to squash. Also you have option to rewrite messages. Option 2 Reset and commit again: git reset --soft HEAD~2 git …
Posts in 2016
-
Access GIT Using SSH Key
Thursday, May 12, 2016 in Git
Categories:
less than a minute
Create SSH Key Create a SSH (private/public) key using the following command ssh-keygen -t rsa -C "somerefname" The above command asks for phase phrase and either enter the pass phrase or press enter for no pass phrase. The above command …