Resources
Answers
Examples
Sign in
Get Started
What do you want to save?
Add Code snippet
New code examples
Shell/Bash
2021-11-14 18:00:09
git set upstream remote branch
git push --set-upstream origin <remote-branch>
Add solution
Shell/Bash
2021-11-13 05:10:15
git pull mirroring
$ git fetch --prune $ git push --prune
[email protected]
:/new-location.git +refs/remotes/origin/*:refs/heads/* +refs/tags/*:refs/tags/*
Add solution
Shell/Bash
2021-11-12 00:51:14
git mirror repository
cd myrepo git fetch origin git push --mirror <remote_repo_git_url>
Add solution
Shell/Bash
2021-11-07 12:44:10
how to make branch in git command
// Example for creating a new branch named myNewBranch git checkout -b myNewBranch // First Push git push --set-upstream origin myNewBranch
Add solution
Shell/Bash
2021-11-03 09:48:07
change commit message after push
git commit --amend -m "New commit message" Then git push --force and you're done
Add solution
Shell/Bash
2021-10-30 05:54:09
git revert to old commit
git reset --soft HEAD@{1} # delete the last commit keeping the changes git reset --hard HEAD@{1} # delete the last commit removing the changes git push --force origin master # delete the last commit also on remote branch
Add solution
Shell/Bash
2021-10-29 03:34:08
undo reset commit git
git reset --soft HEAD@{1} # delete the last commit keeping the changes git reset --hard HEAD@{1} # delete the last commit removing the changes git push --force origin master # delete the last commit also on remote branch
Add solution
Shell/Bash
2021-10-27 01:05:06
how to commit to main branch in git
//Create a New Branch git checkout -b [name_of_your_new_branch] //First Push git push --set-upstream origin [name_of_your_new_branch]
Add solution
Other
2021-10-23 22:47:06
delete remote commit
git reset --hard <last_working_commit_id> git push --force
Add solution
Shell/Bash
2021-10-20 23:16:03
command to create new branch in git
// Example for creating a new branch named myNewBranch git checkout -b myNewBranch // First Push git push --set-upstream origin myNewBranch
Add solution
‹
1
2
3
4
5
6
7
8
›
Best helpers
daily
weekly
monthly
for 3 months
Little Girl
+5
Pratyush Das
+5
show more
This website uses cookies to make IQCode work for you. By using this site, you agree to our
cookie policy
Welcome Back!
Sign up to unlock all of IQCode features:
Test your skills and track progress
Engage in comprehensive interactive courses
Commit to daily skill-enhancing challenges
Solve practical, real-world issues
Share your insights and learnings
Sign in
E-mail
Password
Recover lost password
Log in
Or log in with
Not registered?
Sign up takes less than a minute
Create a Free Account
Sign up to unlock all of IQCode features:
Test your skills and track progress
Engage in comprehensive interactive courses
Commit to daily skill-enhancing challenges
Solve practical, real-world issues
Share your insights and learnings
Sign up
Email
Password
Sign up for free
Or sign up with
By signing up, you agree to the
Terms and Conditions
and
Privacy Policy
. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.