To enter INSERT mod, you press esc plus I. If you need to edit the text, you have to be in INSERT mode in vim. delete lines, change symbols, etc.) If you need to delete lines of code, the vim command is dd. Read the text at the bottom of the screen and make your changes (e.g.
#Sublime merge split hunk how to
Going through the process has given me the side bonus of learning how to use VIM.īelow are the steps to break down your commit into smaller hunks. In the long term, I think I’ll probably continue using an IDE for staging the changes, but here’s how you do it in Terminal.
#Sublime merge split hunk manual
However in Terminal, it’s a much more manual process. It’s visual and you can highlight the lines really easily. These small parts are called “hunks”.Ĭhoosing which parts to commit in a file is really easy in an IDE like GitHub Desktop or Sourcetree. This means when it comes time to make a commit, I want to commit my changes to a particular file in small parts, not all in one big block. This is because I’m not sure if what I’m doing will work, so I don’t want to commit code that adds no value. When I code, I often play around with the code for quite a while before making a commit. Also a quick keyboard shortcut I use a lot: command + k clears the screen. Merge commits: adjacent and non-adjacentĪnything written means that you should replace everything, including the.Enter a description with your commit message.So I’ve given it a shot whilst I’m learning Go.īelow are some of the standard workflows and terminal commands I find myself using over and over: However I read that git in the terminal is more powerful and worth learning. applications with pretty user interfaces).