Git Recovering From Common Mistakes Practice Exam
Question 1 of 50
git tag v1.0.0
git tag -a v1.0.0 -m 'release'
--allow-unrelated-histories
git config --global pull.rebase true
git bisect run ./test.sh
git stash apply stash@{2}
git diff
git rm --cached path
git fsck --lost-found
git show
git reset --soft HEAD~1
git stash list
git stash push -u
git log --graph --oneline --decorate --all
git rebase -i HEAD~5
git fetch origin && git reset --hard origin/branchname
core.autocrlf
.gitattributes
text=auto eol=lf
git cherry-pick <sha>
git checkout branchname -- path/to/file
git gc
git gc --aggressive --prune=now
git stash pop
git add
user.signingkey
commit.gpgsign = true
git diff --word-diff
.gitkeep
git rev-parse --abbrev-ref --symbolic-full-name @{u}
git status
git rebase -i HEAD~3
git log --oneline -n 3
git switch right-branch && git cherry-pick <sha>
git switch wrong-branch && git reset --hard HEAD~1
git cat-file -p <sha>
gc.reflogExpire
git push origin --tags
git clone --branch main --single-branch URL
git branch -m new-name
-M
git restore .
git clean -fd
git clone --depth 1 URL
git reset --hard HEAD~1
git bisect startgit bisect badgit bisect good <sha>
git fetch -p
git blame file
-w
git log -1 <sha>
git show <sha>
git diff sha1 sha2 -- file
git stash drop stash@{0}
rerere
git config --global rerere.enabled true
git config core.ignorecase true
git for-each-ref --sort=-committerdate refs/heads/ --format='%(committerdate:short) %(refname:short)'
git switch
git submodule add URL path
git submodule update --init --recursive
git rebase --skip
git diff --staged
git rebase --abort
git log -L :funcName:file
-S 'searchString'
git log main..feature
git merge --no-ff feature
git reset --soft main && git commit -m 'clean message'
git reflog
git switch -c branchname <sha>
git switch target && git cherry-pick <sha>
git push origin --delete branchname
git bisect reset
git add <resolved files> && git rebase --continue
git switch maingit fetch upstreamgit rebase upstream/maingit push origin main
<<<<<<<
git config user.email 'work@example.com'
--global
git stash apply
git show --name-only <sha>
git checkout -b rescue <sha>
git rebase --edit-todo
break
git rebase --continue
git restore --staged file
git reset HEAD file
git reset --mixed HEAD~1
git filter-repo
git push -u origin branchname
git checkout <sha>
git switch -c branch-name
git fetch && git log HEAD..@{u} --oneline
git add forgotten-filegit commit --amend --no-edit
git switch --orphan feature && git rm -rf .
git pull --rebase
git checkout -- file
git restore file
git revert <sha>
git diff main..feature
git diff main...feature
git status --ignored
git check-ignore -v path
git checkout HEAD~1 -- path
git fetch --unshallow
git reflog show branchname
git reset --hard <old-sha>
git switch feature && git rebase main
git remote add upstream URL && git fetch upstream
git rebase -i --autosquash main
git commit --fixup <sha>
git commit --amend -m 'new message'
git tag -d v1.0.0git push origin :refs/tags/v1.0.0
git log feature..main
pull.rebase true
git stash clear
git clean -nd
git checkout --theirs file
--ours
git push --force-with-lease
git stash push -m 'message'
git diff --cached
--staged
git log --follow -p file
Question navigator