DEV Community

Discussion on: Important Git Commands: Git Commands You Must Know

Collapse
 
chaitanya4vedi profile image
Chaitanya Chaturvedi

Very Nice Suggestion,

interactive staging is a useful feature that helps us to logically separate commits.

we can enter interactive mode by running

git add -i

This makes git enter into an interactive shell listing all the commands at the bottom

`$ git add -i
staged unstaged path
1: unchanged +0/-1 John
2: unchanged +1/-1 index.html
3: unchanged +5/-1 lib/examplegit.rb

*** Commands ***
1: [s]tatus 2: [u]pdate 3: [r]evert 4: [a]dd untracked
5: [p]atch 6: [d]iff 7: [q]uit 8: [h]elp
john >

We can then perform operations using the listed commands.

Thanks for Reading.