Git Flashcards
(158 cards)
stage file(s) in git start tracking file(s) in git
git add «file1» («file2» «file3»)
git add «folder»
» adds precisely this content to the next commit
show git commit history of the branch
git log
what is a git remote?
a label to a url
add git remote with a label?
git remote add «remote name» «remote label»
show git remotes and their remote URLs
git remote -v
stage all file modifications and new files in git
git add .
show local git branches
git branch
show remote git branches
git branch -r
show all git branches
git branch -a
git branch –all
create and switch to new git branch
git switch -c «branch»
git checkout -b «branch»
download git repository
git clone «repository url»
update local cache of specific git remote and remove outdated branch trackings
git fetch «remote» –prune
download git repo to specific folder
git clone «repository url» «folder»
show short version of git status
what is left and what is right?
git status -s
» left: status of staging area
» right: status of workspace
show differences between git staging area and workspace
git diff
show differences between git staging area and last commit
git diff –cached
git diff –staged
commit all already tracked files in git
git commit -a
delete file(s) and remove file(s) from git as well
git rm «file1» («file2 «file3»)
delete file(s) and remove file(s) from git when content was modified or staged
git rm -f «file1» («file2 «file3»)
remove file(s) from git only
git rm –cached «file1» («file2 «file3»)
show preformatted git log
git log –pretty=oneline/short/full/fuller
show git logs with ASCI graph
git log –graph
show all git commits that changed a specific string
git log -S «string»
show all git commits with specific string in commit message
git log –grep=«string»