What do you want to save?
Add Code snippet
New code examples
-
Shell/Bash 2021-11-13 18:43:28
git how to work with remote branch and fork
Step 1) Checkout new branch `git checkout -b new-branch` Step 2) Make changes Step 3) Add to git `git add .` Step 4) Commit `git commit -m "Made changes!"` or `git commit -a` Step 5) Push to your repo `git push origin new-branch` Step 6) Make PR... Add solution -
TypeScript 2021-11-12 19:21:11
squash commits on branch
$ git rebase -i HEAD~4 At the interactive screen that opens up, replace pick with squash at the top for all the commits that you want to squash. Save and close the editor through esc --> :wq $ git push origin branch-name --force Add solution -
Shell/Bash 2021-11-12 13:12:10
Change a branch name in a Git repo
# Start by switching to the local branch which you want to rename: git checkout <old_name> # Rename the local branch by typing: git branch -m <new_name> # At this point, you have renamed the local branch. # If you’ve already pushed th... Add solution -
Shell/Bash 2021-11-11 14:36:26
Common GIt Commands
git init //add all git add . //cancel adds git reset //cancel commits git reset HEAD^ //cancel last 3 commits git reset HEAD~3 //when first commit git push -u origin master //remove remote origin git remote remove origin //reset remote origin git rem... Add solution