What do you want to save?
Add Code snippet
New code examples
-
Shell/Bash 2021-08-31 12:51:02
update my fork repository at github
## Add Original Repository git remote add upstream https://github.com/OriginalOwner/OriginalProject.git ## Verify if Repository is added git remote -v ## Fetch Updates from Original Repository git fetch upstream ## Checkout to your master branch git ch... Add solution -
Shell/Bash 2021-08-31 11:21:02
git create branch from tag
git checkout -b newbranch v1.0 Add solution -
Shell/Bash 2021-08-31 01:17:01
unstage previous commit
git reset --soft HEAD~1 Should do what you want. After this, you will have the first changes in the index (visible with git diff --cached), and your newest changes not staged. git status will then look like this: # On branch master # Changes to be com... Add solution -
Shell/Bash 2021-08-30 20:17:01
How to revert uncommitted changes including files and folders?
# If you want to revert the changes only in current working directory git checkout -- . # discard anything (note: you have to be in the directory # where all of the changes are located) # or you can use the command on line 9, you can discard anything # o... Add solution -
Shell/Bash 2021-08-30 20:13:01
how to checkout to another branch in git
git checkout branch name Add solution -
Shell/Bash 2021-08-30 16:45:01
how to undo a modified file in git
# If you want to revert the changes only in current working directory git checkout -- . # discard anything (note: you have to be in the directory # where all of the changes are located) # or you can use the command on line 9, you can discard anything # o... Add solution