Git Basics #

Last updated March 17, 2026
git

checkout a branch

git checkout branchname

force git to forget about a file

git rm --cached .gitbook/assets/Jenkins.png

to restore a file to what it was before current working changes

git restore file

to abort a rebase operation

git rebase --abort

show the remote url

git remote show origin

show the status of your branches

git branch -vv