Matouš
Czerner
How to Love Git
Developer
Matouš Czerner
www.shopsys.com
Develop Faster. Stay Innovative.
matous.czerner@shopsys.com
Developer of Shopsys Framework
Docker fan
Why am I even talking about Git?
www.shopsys.com
Develop Faster. Stay Innovative.
What is causing this?
www.shopsys.com
Develop Faster. Stay Innovative.
www.shopsys.com
Develop Faster. Stay Innovative.
www.shopsys.com
Develop Faster. Stay Innovative.
www.shopsys.com
Develop Faster. Stay Innovative.
www.shopsys.com
Develop Faster. Stay Innovative.
www.shopsys.com
Develop Faster. Stay Innovative.
Git Rebase
www.shopsys.com
Develop Faster. Stay Innovative.
www.shopsys.com
Develop Faster. Stay Innovative.
www.shopsys.com
Develop Faster. Stay Innovative.
git rebase origin/master
www.shopsys.com
Develop Faster. Stay Innovative.
www.shopsys.com
Develop Faster. Stay Innovative.
www.shopsys.com
Develop Faster. Stay Innovative.
What is the difference?
www.shopsys.com
Develop Faster. Stay Innovative.
With git rebase
Without git rebase
www.shopsys.com
Develop Faster. Stay Innovative.
Conclusion
www.shopsys.com
Develop Faster. Stay Innovative.
But wait. Can we do more with it?
www.shopsys.com
Develop Faster. Stay Innovative.
Daily code reviews and fixes
www.shopsys.com
Develop Faster. Stay Innovative.
3cc0f07 CHANGELOG informations added
ca7f5d9 greatest contribution ever
www.shopsys.com
Develop Faster. Stay Innovative.
Code Review time
www.shopsys.com
Develop Faster. Stay Innovative.
7fa3a66 fixed code and stuff
b328677 fixed CHANGELOG
3cc0f07 CHANGELOG informations added
ca7f5d9 greatest contribution ever
www.shopsys.com
Develop Faster. Stay Innovative.
git rebase --interactive origin/master
www.shopsys.com
Develop Faster. Stay Innovative.
rebase interactive
www.shopsys.com
Develop Faster. Stay Innovative.
pick 7fa3a66 fixed code and stuff
pick b328677 fixed CHANGELOG
pick 3cc0f07 CHANGELOG informations..
pick ca7f5d9 greatest contribution ever
www.shopsys.com
Develop Faster. Stay Innovative.
fixup b328677 fixed CHANGELOG
pick 3cc0f07 CHANGELOG informations..
fixup 7fa3a66 fixed code and stuff
pick ca7f5d9 greatest contribution ever
www.shopsys.com
Develop Faster. Stay Innovative.
3cc0f07 CHANGELOG informations added
ca7f5d9 greatest contribution ever
www.shopsys.com
Develop Faster. Stay Innovative.
Conclusion
www.shopsys.com
Develop Faster. Stay Innovative.
But what if I F*CK up and my changes get lost?
www.shopsys.com
Develop Faster. Stay Innovative.
Reflog gots your back.
www.shopsys.com
Develop Faster. Stay Innovative.
git reflog
www.shopsys.com
Develop Faster. Stay Innovative.
HEAD@{0}: rebase -i (finish): returning to my-greatest-contribution
HEAD@{1}: rebase -i (fixup): Updated readme, cuz it makes sense
HEAD@{2}: rebase -i (pick): Updated readme, cuz it makes sense
HEAD@{3}: rebase -i (fixup): My flawless contributions
HEAD@{4}: rebase -i (start): checkout origin/master
HEAD@{5}: commit: Fixed code and stuff
www.shopsys.com
Develop Faster. Stay Innovative.
git reset --hard HEAD@{5}
www.shopsys.com
Develop Faster. Stay Innovative.
Git is your friend.
www.shopsys.com
Develop Faster. Stay Innovative.
Matouš Czerner
matous.czerner@shopsys.com
www.shopsys.com
Develop Faster. Stay Innovative.