Introduction to Git – Branching and Merging

Introduction to Git – Branching and Merging

HomeDavid MahlerIntroduction to Git – Branching and Merging
Introduction to Git – Branching and Merging
ChannelPublish DateThumbnail & View CountDownload Video
Channel AvatarPublish Date not found Thumbnail
0 Views
Introduction to Git – Branching and Merging.
Twitter: @davidmahler
LinkedIn: https://www.linkedin.com/in/davidmahler

Introduction to Git – Core Concepts (recommended prerequisite): https://youtu.be/uR6G2v_WsRA

Reference:
https://git-scm.com/book/en/v2

Commands used:
git log = Git history
git log –all –decorate –oneline –graph = graph of commit history
git branch (branch-name) = create a branch
git checkout (branch-name) = check out a branch/move head pointer
git commit -a -m /"commit message/" = commits all changed and tracked files in one command (bypasses the separate "git add" command)
git diff master..SDN = Diff between 2 branches
git merge (branch-name) = Merge branches (fast forward and 3-way merges)
git branch –merged = Show branches merged into the current branch
git branch -d (branchname) = delete a branch only if it has already been merged
git branch -D (branch name) = delete a branch even if it has not been merged yet (be careful here)
git merge –abort = Abort a merge during a merge conflict situation
git checkout (commit-hash) = checks out a commit directly, not via a branch, results in a separate HEAD state
git stash = create a stash point
git stash list = List stash points
git stash list -p = List stash points and show differences per stash
git stash apply = apply latest stash
git stash pop = apply latest stash and remove from saved stashes
git stash apply (stash reference) = apply a specific stash point
git stash save /"(description)/" = create a stash point, be more descriptive

Please take the opportunity to connect with your friends and family and share this video with them if you find it useful.