github - unable to move files from unstage with git -


i attempting unstage 2 files. when type git status message is:

  on branch master   branch up-to-date 'origin/master'.   changes committed:   (use "git reset head <file>..." unstage)      modified:   public/javascripts/app.js     new file:   views/templates/caffeinetable.html 

i used git reset head , file unstage shown on command line. however, when follow instructions on branch master

  (use "git add <file>..." update committed)   (use "git checkout -- <file>..." discard changes in working directory)     modified:   public/javascripts/app.js 

i followed first step , added file updating. however, when git status. @ same starting position.

i read through docs on git https://git-scm.com/book/en/v2/git-basics-undoing-things, not sure if git checkout need.

the goal have date , nothing in staging.

you need basic notions git. when @ second step:

(use "git add <file>..." update committed) (use "git checkout -- <file>..." discard changes in working directory)   modified:   public/javascripts/app.js 

git telling app.js file changed, compared last version. file (probably) date, has additional changes. can use

git diff 

to show it's difference head version (= last version in history). git offers 2 choices:

  1. git add: want stage these changes; means prepare these changes commit them , keep them in history.
  2. git checkout: want discard these changes; cannot undone; file replaced head version of file.

Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -