Posts

Showing posts from January, 2019

Daily git

Image
Git commit log git log --oneline -n 2 where:- -n 2 :- print last 2 commit only  <code> push origin remote branch </code> git log --oneline -n 4 where:- --oneline : to show commit in a single line (otherwise it will print Author,Date etc. details as well as above) Change/Modify/Amend last commit message  git commit --amend Above command will pop up a vi/gui editor depends on your configuration. Edit the message and save (vi command ->  ESC :wq ) After Merge Branches But Preserve/Skip Few Files Lets take a scenario where you want to merge branch A into branch B but both have some common files e.g. Version / Config.xml  with different version or configuration. For example  Dev/ReleaseCandiate/Production branches have different version file so while merging our code from Dev to RC/Prod we would not like to update prod Version file with our local Dev version and there are other N number of scenarios. ...