You've been hacking away at a project when you realize: "I haven't committed in an hour." Or, perhaps worse still: "my unstaged changes represent m...
For further actions, you may consider blocking this person and/or reporting abuse
Is it possible to see conflicts before merging the code using git ?
Yes. Say you're in the master branch and you want to check a branch called 'feature' for conflicts. Do
git merge feature --no-ff --no-commit
. Once you have what you need, to get out of the state this puts git in, dogit merge --abort
.Just want to make a minor correction. At the time of writing (git version 2.30.2) you can edit changes in a line and stage them separately via patch mode. Though at the end of the day the changes do have to be able to be represented in terms of an entire line. Maybe that's what you meant in the first place but in case anyone needs an example:
Say I add this function to a file:
I can do:
git add -p
and edit just by deleting what I don't want via the editor (in this case the func arg and corresponding line):
save, quit, and voila:
git commit
git add -p
it seems like they changed the behaviour on
git add --intent-to-add
, i can no longergit add -p
on a new file, thee
option doesn't appear or work