[Gambas-devel] Fwd: Cloned and edited. How do I get the changes staged, committed, and then uploaded to GitLab?

Tobias Boege taboege at ...176...
Mon Aug 21 17:35:03 CEST 2017


On Mon, 21 Aug 2017, d4t4full at ...176... wrote:
> I also wonder why I had to GIT ADD a file that was cloned, tho. Shouldn't Git already know the file WAS modded and that it HAD to be committed? Anyway I didn't commit it signed so I clearly messed up.
> 

That's a feature :-) Imagine you have worked furiously all day and in the
evening you realise that you did lots things which you'd rather break up
into smaller logical pieces and commit them individually.

If you assume that it is desirable to be able to revert commits, then you
would want a commit to do just one thing. If you made changes to the IDE
and gb.db.odbc in the same commit, simply reverting the commit because you
messed up in the IDE would undo your changes to ODBC as well. Someone
correcting your mistake would have to separate your changes and just undo
the IDE-related part by hand.

git lets you go as far as committing only *parts of certain files*, with
git add -i. Remember: git is the stupid content tracker.

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk




More information about the Devel mailing list