VSCode is my favourite editor. But while rebasing and resolving merge conflicts, I switch to Atom as their git integration is too damn good for resolving conflicts IMO. Just wondering what other tools/strategies devs use in general for resolving merge conflicts.
This is my usual flow
- Go to terminal and
git rebase master
- When conflict occurs, I open Atom, resolve conflict and stage the file
- I come back to terminal and
git rebase --continue
Oldest comments (35)
My current Git workflow is:
VSCode's built in git isn't that great if you ask me. I like selective staging where I can stage/unstage particular line(s), which isn't supported by VSCode. Also, you cannot use keyboard in their staging area, which is very much bad experience for me.
Maybe we all should pool in and port the Atom's git integration to VSCode so we'll have the perfect editor of all time.
You can stage/unstage particular lines with VSCode. I do it all the time. Only rule is that the lines must be consecutive.
Vs codes conflict resolver is also good, no need for another tool. Source tree to Vs code.
Check out Gitkraken it's a good GUI tool build for git. They support most of the git features and also make the merging and rebasing process very easy.
Some time ago I used that tool. But when they switched their TOC to having to pay for it for non open source stuff, I left it
Same, and it started requiring an account be set up. For the desktop app. No thanks.
GitKraken is good as long as you only do reads (checkout and diff) and not writes (commits and rebase) 'coz they don't support local config or multiple config in their community edition which is kind of a bummer.
I used to be a big fan of GitKraken, though on larger repositories it seem to just slow down to a crawl for me. It would just take forever for them to open. Sometimes spin forever.
I also tried to use with git LFS enabled and kept having issues with it sadly.
I do my git stuff via command line, idk I learnt git on the CLI, never used a GUI for it and I just sticked to that, I guess. :D
Sometimes I'll use Atom too, for repos being hosted on GitHub anyway.
I'm still the terminal guy. You don't need anything when you got oh-my-zosh right?
But how do resolve conflicts when you rebase?
I usually,
git rebase master
git rebase --continue
I use the command line for everything except for adding things when I have lot of changes. For that thing i use gitkraken or git-gui. Being a command line user I use Vim as git editor.
If its a fairly complex merge conflict, I use the builtin three way merge in fugitive (vim plugin). I don't normally run into major merge conflicts though.
All from the command line. Close eyes. Try merge. Pray. :D
I'll have to check out some of the tools mentioned in rest of comments though. I think it is important to know how to do it from the CLI, but if you do know how to do that, I don't mind a tool as well.
I've been working on a feature branch for three weeks now that has around 50 new commits and rebase them every single day with
master
. So I totally relate with closing eyes and praying part :DThis is the best way to merge in Git.
FYI: DO NOT RUN THESE COMMANDS. This will not merge instead it will force a pushed commit.
I see what you did there 🔥
hahahah
This is pretty bad, maybe copy the warning to above the code as well.
And into the code as a comment, for good measure.
Done
Beyond Compare is the best tool I know for handling 3-way-merge.
I also use Fork and GitExtensions.
magit (with evil-magit plugin)
It is, hands down, the best git UI/UX I've experienced. Advanced git operations become simple and obvious.
Wait!!! Wait!!! Wait!!!
Guys, use smartgit, especially during merge and rebase.