Posts

Showing posts with the label git

Handy git commands

 by Aditya Kapre Shrewsbury Massachussets Boston To reword/change last N commit messages git rebase -i HEAD~N [Then replace "pick" by letter "r" and exit] [Interactively change each message one by one by exiting each time message is changed] Do not check in certain files such as local config values https://stackoverflow.com/a/48882519/3361121 git update-index --skip-worktree MySetupClass.java Undo above skip worktree ------------------------ git update-index --no-skip-worktree <file> get-latest-from-master-to-feature ---------------------------------- 1. Assume you are on feature branch currently and have untracked changes (git add not applied yet), then Stash current changes not committed a. git stash save --include-untracked -m "my changes to be used for later" b. git stash list --date=relative (see those are shown in list) c. git stash list --format='%gd (%cr): %gs' (more detailed that above) 2. C

StackOverflow

profile for Aditya Kapre Shrewsbury at Stack Overflow, Q&A for professional and enthusiast programmers

LinkedIn