Difference between revisions of "Git"
Line 19: | Line 19: | ||
<pre> | <pre> | ||
git remote set-url origin https://github.com/username/repo | git remote set-url origin https://github.com/username/repo | ||
+ | </pre> | ||
+ | |||
+ | == stash == | ||
+ | <pre> | ||
+ | git stash | ||
+ | git stash list | ||
+ | </pre> | ||
+ | Speichert alle Änderungen und macht ein undo changes. Diese können später wieder aktiviert werden: | ||
+ | <pre> | ||
+ | git stash pop | ||
</pre> | </pre> |
Revision as of 14:28, 10 February 2019
switch branch
git checkout -b <branch>
Mit der b Option wird ein neuer Branch kreiert.
fetch und pull
git fetch origin
git fetch really only downloads new data from a remote repository - but it doesn't integrate any of this new data into your working files.
git pull origin master
git pull, in contrast, is used with a different goal in mind: to update your current HEAD branch with the latest changes from the remote server.
set remote url
git remote set-url origin https://github.com/username/repo
stash
git stash git stash list
Speichert alle Änderungen und macht ein undo changes. Diese können später wieder aktiviert werden:
git stash pop