How to commit part of file in Git
newbeelearn.com
How to commit part of file in Git
1–10 of 104 posts
Re: How to commit part of file in Git
#2Splitting up commits is totally underrated and seen rarely. I see colleagues over and over again plumbing 4 kinds of changes into the same commit. Good luck reverting the one change that caused an outage.
Re: How to commit part of file in Git
#3The only sane way to do this is with a proper IDE. Doing it via the command line is pure masochism.
Re: How to commit part of file in Git
#4GitHub Desktop does this very well. Highly recommend!
Re: How to commit part of file in Git
#5The only sane way to do this is with a proper IDE. Doing it via the command line is pure masochism.
Why? I use git add -p absolutely all the time, its really simple to learn
Re: How to commit part of file in Git
#6The only sane way to do this is with a proper IDE. Doing it via the command line is pure masochism.
lazygit is my answer to this problem... and so many others.
Re: How to commit part of file in Git
#7Re: How to commit part of file in Git
#8Re: How to commit part of file in Git
#9The only sane way to do this is with a proper IDE. Doing it via the command line is pure masochism.
It’s perfectly doable in the command line. Utilities like git-gui make it fairly easy to stage and commit chunks or lines. Git plug-ins for vim or eMacs (the article mentions magit) are also quite efficient. You don’t need a bloated IDE for this.
Re: How to commit part of file in Git
#10The only sane way to do this is with a proper IDE. Doing it via the command line is pure masochism.
stgit makes it trivial.