In Simply Git, we covered how to stage all the changes from the working to staging area. Let’s use our new bash function syntax to build an alias that stages all of the changes and then displays the status.
Merge conflicts will happen. Let’s create one together. Then we’ll walk through how to find them and fix them.
In this episode, you and I will walk through the update workflow using the merge strategy. In order to do this, we’ll have to get creative in order to create a situation where the branch you are working on does not have the most recent updates that are in your develop branch. The workflow is: Checkout your develop branch. Pull the latest changes to update that branch. Checkout the change you are working on. Then do a git merge develop to update your branch. When this happens, git will create a “merge commit.” Here, let’s do it together.
I often like to view the last commit’s log in order to remember what happened last. Let me show you how to view that log and then create an alias for it.
In the Simply Git, you learned how to add new changes to your last commit. We can streamline that process to: Add all changes from both the working and staging areas. Keep the last commit message and not pop open the editor. Display the log when we’re done. Let’s build an alias.
In Simply Git, you learned how to fix the last commit message. Let’s build an alias.
Let’s talk about naming strategies for your branches. Hint: Each team and/or project may have its own strategy for naming branches.
In the Git Contributing lab, I had you typing the really long command to view the one-line, decorated, graphical log. It’s one of my favorite commands as it gives you so much valuable information about your project’s history. Typing out that command is time consuming and frankly a waste of your valuable time. You have to try to remember all the options. That takes your focus off of where you add value. Let’s create an alias shortcut to make it so easy.
In Simply Git, you learned how to unstage all of the changes, moving them from the staging to working area. The command and options are not intuitive, which means they are not rememberable. Let’s build an alias.
Let me introduce you to this lab.