Essential git commands every developer should know
There are some lesser-known Git commands that may make your life easier. We all have our everyday Git commands that we use over and over. But what if I told you there are some lesser-known Git commands that may make your life easier . Let's See! Photo by Luke Chesser on Unsplash # git add-p We all may know the command git add <file> or git add. But Why do we need to know git add -p Ever wanted to commit just a section of a file and not the entire thing? Once this command runs, we’ll be asked about " hunks ". " Hunks " are the chunks of code that we'll decide what to do with. You’ll see the question, " Stage this hunk [y, n, g, a, d, e, ?] ?" at the bottom of the terminal. What Do those letters mean: y: stage this hunk n: do not stage this hunk g: select a different hunk to go to a: stage this hunk and all the other hunks in this file d:...