6 ms·
I work in a lot of repos at once. I do a lot of global search-and-replacing and random debugging. With SourceTree, I can easily see all the changes I've made ac
by suzzer99 2y ago
I work in a lot of repos at once. I do a lot of global search-and-replacing and random debugging. With SourceTree, I can easily see all the changes I've made across all repos in one glance.
I can then drill down to each file with the visual diff and see whether the changes are something I want to check in, or just debugging. If it's debugging code, I can click "Discard Changes" to drop all changes I've made to that file. Or I can selectively discard a hunk or discard lines.
When I show these features to command line purists, they always concede that this can't easily be done with the command line. So I don't see what's to gain if I'm losing those features, which I rely on constantly.
I've been working in SourceTree for a decade, so I know all the quirks by now, which I pass on to any new devs who want to use it.
- fragmede 2y ago> can't easily be done with the command line. git add -p ?
- metaltyphoon 2y agoLearning the -p was the biggest gain I’ve had after years of using git via cmdline only.
- suzzer99 2y agoWhich is kind of the point. If a GUI editor does this stuff for you, that seems like a win over incrementally learning these little command line tricks that save you a bunch of time.
- metaltyphoon 2y agoThat’s fine for some and I have no problems with it but my mind doesn’t work that way and instead it asked “how is possible the UI is doing this”. All of that lead to learning what hunks are and manually editing them to learn.
- greg5green 2y agoYou can do it with stash too!
- suzzer99 2y agoHow does this scan a bunch of repos at once and let me see all the changes at a glance, and then drill down to individual files to either discard the changes (revert back to their committed state) or check them in? All git add -p does is that last part from what I can tell. I'd still have to cd into each repo and run git status one by one (I've made changes to up to 10 repos before for one tweak), and then do a git add -p to the changes I do want, and a git stash to the changes I don't and then delete the stash.
- fragmede 2y agoIf "cd" and "git status" in a bash for loop is too advanced, you might need a GUI. Though I'd also argue that you've got too many separate git repos if you're finding yourself needing to do that often. It all depends on where you are on the journey to Monorepoland.
- suzzer99 2y agoWe're too small to implement a monorepo, because no one has time to build the tools we'd need to do it right. I still don't see what I gain by cd-ing into all those directories and running git status and looking at a bunch of text results, when I can just glance at the SourceTree repo window and see all the repos I've touched.
- nicoburns 2y agoI would argue that "git add -p" is the one thing which is unambiguously better with a GUI. Scrolling through changes and staging lines is just much nicer with a mouse.
- robertlagrant 2y agoI semi-agree - the real win is in unstaging changes you didn't mean to stage! Much easier in a GUI, because I don't have to remember the non-symmetric CLI command.