Current Size:
Chakra BreakPoints
base0px
sm480px
md768px
lg992px
xl1280px
2xl1536px
Current Height:Width
widthpx
heightpx

Subjects

git

Date Created: 2022/02/11

Last Update: 2022/11/28

#git #cheatsheet #reference

general ssh notes

Git Branching Strategies

Git Branch Strategy - gitkraken

CheatSheet

Check Git Configurations

git config --global --list
git config --local --list
git config --system --list

Get Remote Origin Url

git config --get remote.origin.url

Reference for Common Challenge and Solutions

Solving Git Ignoring GitIgnore

git rm -r --cached .
git add .
git commit -m "fixed untracked files"

Revert a Committed Change with reset HEAD

Go back to HEAD

git reset --hard HEAD

Go back to commit before HEAD

git reset --hard HEAD^
git reset --hard HEAD~1

Go back two commits before HEAD

git reset --hard HEAD~2

Delete Local and Remote Branches

// delete branch locally
git branch -d localBranchName
// delete branch remotely
git push origin --delete remoteBranchName

Multi User Challenge

git credential --help

CheatSheet

Merge Priority

theirs or ours

git merge --strategy-option theirs <feature-branch> staging
git merge -X theirs staging <bug-fix>

Reference

More Notes

All Notes
HomeProjects

Links

Home Articles Notes Projects About Style Guide Site Credits

Contact

 [email protected]

Location

🌎 Earth