Some developers prefer to work with a graphical Git client. If you want to reset local changes. e.g. of one file that has been deleted and one that has been changed

git checkout .
git checkout favicon.ico readme.html

you would select those files in Sourcetree and then right or comand click on the selected files:

and then confirm:

On the console this would look like this before:

➜ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	deleted:    favicon.ico
	modified:   readme.html

no changes added to commit (use "git add" and/or "git commit -a")

And like this after:

➜ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

 

Tagged:

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.