With regards to version control systems, I first used CVS for a very short time and then SVN before starting my first real job where the company has been using TFS (Team Foundation Server). TFS was similar to SVN with the possibility of "blocking" access to files. A way to avoid merge conflicts. It's very synchronous and that works as long as you're alone or with 2 people on the team, but it definitely doesn't scale (not to mention what happens if someone leaves for vacation & forgot to checkin).
Ultimately that checkout => lock => checkin workflow didn't work any more. Moreover branching/merging was a pain. That was when Git became more popular and I started giving it a closer look (yes this blog post is reeeeallly old π). So I got the assignment to check out git more in depth and finally move our teams (yep multiple) over to using Git.
As you know Git is really powerful, but with great power comes great responsibility. That was even more true when you start from TFS where files are actually being locked. You simply need workflows, how to use git, when to branch, how to merge them back and so on. Otherwise you'll end up in a big mess. At that time there were already different workflows available, the Git Flow approach, later the GitHub Flow and GitLab Flow came along. I was always inspired by a more trunk based development scenario. Where you have one main line (be it trunk or master or whatever you wanna call it), where people integrate quickly and often. Keeping long-lived branches are nearly always going to end up in a lot of work and merging mess.
Anyways, to come to a conclusion point. Over the years I've worked with many different teams and most always I've seen people fight with Git merges, or use strange workflows (like manually copying folders for backup). Many didn't know about utterly simple commands which can make a big impact in your day to day workflow. So after years I finally decided to sit down and record a series of videos, showing some real-world recipes & according Git commands I'm using on a daily basis. Nothing too fancy, but rather just a few simple commands that will help you do the job.
Egghead: Productive Git for Developers
With this course, I aim at a different goal. You will walk through a series of scenarios which youβll most commonly encounter in your daily work life as a developer. Iβm talking:
- updating your feature branch with the latest changes from master
- polishing your git history to make it ready for being peer-reviewed
- moving a set of commits to another branch
- undoing accidental commits
The goal is not to cover everything, but those tasks that will greatly improve your daily productivity with Git.
If you're interested, check it out over on Egghead.io.
Here are the current lessons on the course (will be updated over time with new ones as well):
- Only commit some of my currently modified files into the repository
- Make my git log look pretty and readable
- Move some commits to a separate branch that I have accidentally committed to master
- Update my feature branch with the latest changes from master
- Push a rebased local branch by using
--force-with-lease
- Polish my git feature branch before merging or submitting for review
- Automate the cleanup of my feature branch with Git Autosquash
- Squash all of my commits into a single one and merge into master
- Change the commit message of my last commit
- Add a file Iβve forgotten to add to my last commit
- Undo my last commit and split it into two separate ones
- Wipe a commit from my local branch
- Undo a commit that has already been pushed to the remote repository
- Temporarily store some work in progress because I have to jump to another branch
Let me know what you think π
Top comments (3)
Thank you! :)
Perhaps consider adding parts of a file to a commit?
Hi Alex. Thx for the hint, will do. In fact, I have a couple of lessons I'm planning to add to the course over the next weeks. Just need to find some free time π