Git Commands Ultimate Tutorial [Part 2]

Nesha Zoric on April 11, 2018

In the last Git Commands article, you have learned how to use Git options and what they can do. Today, we will extend our reach and discover ever... [Read Full]
markdown guide
 

A good command, which I should have learned when starting with Git, is the partial commit using git add -p <file>. This lets you decide which part of a file you want to add to the next commit. The following dialog lets you decide what to do with the given chunks: y yes - add it, n no - dont add it, s split the current part into smaller parts.
Very handy at the beginning when you change a lot of stuff, and need to create proper commit messages afterwards.

PS: I published a Git Cheat Sheet with the most common Git commands β†’ pixelbrackets.github.io/git_cheat_...

 

yep literally only learnt this the other day, so useful πŸ‘ŒπŸΎ

 

You could talk about the git commit -S that uses GPG key to sign a commit. I just set it up this years and it looks great on GitHub !

 

You could also do git config --global commit.gpgsign 'true' to make this persistent. You'll need to set user.signingkey too, though.

 

That's really interesting! I will definitely check it out.

code of conduct - report abuse