Skip to main content
Add shell syntax highlighting
Source Link
Benjamin Loison
  • 5.5k
  • 4
  • 18
  • 37

git add myfile.txt # This will add your file into the to-be-committed list

Quite opposite to this command is,

git reset HEAD myfile.txt  # This will undo it.
git reset HEAD myfile.txt  # This will undo it.

so, you will be in the previous state. Specified will be again in untracked list (previous state).

It will reset your head with that specified file. so, if your head doesn't have it means, it will simply reset it.

git add myfile.txt # This will add your file into the to-be-committed list

Quite opposite to this command is,

git reset HEAD myfile.txt  # This will undo it.

so, you will be in the previous state. Specified will be again in untracked list (previous state).

It will reset your head with that specified file. so, if your head doesn't have it means, it will simply reset it.

git add myfile.txt # This will add your file into the to-be-committed list

Quite opposite to this command is,

git reset HEAD myfile.txt  # This will undo it.

so, you will be in the previous state. Specified will be again in untracked list (previous state).

It will reset your head with that specified file. so, if your head doesn't have it means, it will simply reset it.

Active reading - but more work is definitely required, e.g. near "Specified will be again in".
Source Link
Peter Mortensen
  • 31.3k
  • 22
  • 109
  • 132

git add myfile.txt # this# This will add your file into the to be committed-be-committed list

Quite opposite to this command is,

git reset HEAD myfile.txt  # thisThis will undo it. 

so, you will be in the previous state. specifiedSpecified will be again in untracked list (previous state).

itIt will reset your head with that specified file. so, if your head doesn't have it means, it will simply reset it.

git add myfile.txt # this will add your file into to be committed list

Quite opposite to this command is,

git reset HEAD myfile.txt  # this will undo it. 

so, you will be in previous state. specified will be again in untracked list (previous state).

it will reset your head with that specified file. so, if your head doesn't have it means, it will simply reset it

git add myfile.txt # This will add your file into the to-be-committed list

Quite opposite to this command is,

git reset HEAD myfile.txt  # This will undo it.

so, you will be in the previous state. Specified will be again in untracked list (previous state).

It will reset your head with that specified file. so, if your head doesn't have it means, it will simply reset it.

Source Link
Mohideen bin Mohammed
  • 19.7k
  • 11
  • 118
  • 127

git add myfile.txt # this will add your file into to be committed list

Quite opposite to this command is,

git reset HEAD myfile.txt  # this will undo it. 

so, you will be in previous state. specified will be again in untracked list (previous state).

it will reset your head with that specified file. so, if your head doesn't have it means, it will simply reset it