Git
https://levelup.gitconnected.com/use-git-like-a-senior-engineer-ef6d741c898e
https://medium.com/mindorks/use-of-git-reset-git-revert-git-checkout-squash-commit-2b721ca2d2d3 https://teamtreehouse.com/community/difference-between-git-checkout-filename-and-git-revert https://git-scm.com/book/en/v2/Git-Basics-Undoing-Things
https://www.freecodecamp.org/news/git-diff-command/
Git = Push, Pull, Branching, Merging, conflict resolution. stash creating new branch rebase merge checkout swagg git switch fetch vs pull difference in git git squash git rebase
fast forward merge branch creation and usage in git
git fetch -all fetches all branches of all remotes git branch
git diff --cached = to show staged changes git show commit_id --name-only = to display all the files committed in the specified commit_id. 919836332632.0
git log https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History git log -p -2 = -2 to show only the last two entries. git log --stat
git log -p -- filename =
git reset
git reset --hard HEAD (if you do not mind losing those minor changes)
git ammend - Git amend is a command in Git that allows you to make changes to the most recent commit in your repository without creating additional commits. It is particularly useful for editing commit messages, although you can also use it to add or remove files from the previous commit.
git show
git log
¶
- git config user.name "Christian Contribution Project
- git config user.email "christian@personalemail.com
- git config --list / git config user.name / git config user.email
Get Remote Repo URL¶
- git config --get remote.origin.url / git remote -v
merge conflict solving¶
- code below <<<<HEAD amd above ====== is already exists in your current head branch
- content below ==== and >>>> new branch is new upcoming code
diff two branches¶
- git diff branch1 branch2
SWITCH VS CHECKOUT DIFF¶
- git checkout is a multi-purpose tool, capable of switching branches, discarding changes, and even creating new branches
- git switch is more specialized, focusing solely on switching and creating branches.