Dec. 19, 2018, 9:14 a.m., by Lem

Old git mastery

[EVOLVING POST]


Practices


Working with branches



Working with commits



Commands memo


Branches


git fetch -p origin (fetch branches from remote, prunes the local cache)

git branch -a (List all branches remote and local known by local)


History


git log --all --graph --decorate --oneline (allows to see every known commit and stash, really helpful. May be confusing about graph lines)


Stash


(source: stack-overflow thread)
git stash --all (stashes all files, including untracked and ignored files)
git stash --include-untracked (no longer touches ignored files (tested on git 2.16.2))

> More Infotips articles

Add a comment

| RSS feed for all notifications | for dev news only