Skip to main content

git command

add

to add file/dir to Staging

bisect

to walk through Commit History via Binary Search to find good/bad Commits

branch

to create new Branch

checkout

to move onto Branch

clean

to delete Untracked files - !will this del /node_modules, etc??

clone

to download copy of remote Git Repo/Diff to local repo

commit

to create new Commit with Diff added in Staging

config

to create alias

diff

to print Diff between Commits

fetch

to download Diff in remote Git Repo

git-filter-branch

init

to initialize new empty .git repo for project

log

to print Commit History with SHA UID, timestamp & msg name

merge

to Merge Branches

pull

fetch + merge combo to sync remote

push

to sync local Git Repo to remote

rebase

to rewrite Commit History to simplify/linearize Merge

reflog

remote

to link local Git Repo to remote Git Repo

reset

to remove files from Staging (no modify/delete)

revert

to safely undo bad Commit via new Commit & keep Commit History

rm

to del .git

stash

to save Diff w/o Commit, to array list

status

to show state of Git Repo; list files in Staging/untracked/Commit History

switch

same cmd as checkout

References