Resources
Answers
Examples
Sign in
Get Started
What do you want to save?
Add Code snippet
New code examples
Shell/Bash
2021-09-01 05:13:01
error: src refspec master does not match any. git
# You are trying to add an empty repository, add something first, like a readme touch README.md git add README.md git commit -m "Initial commit" git push --set-upstream origin master
Add solution
Shell/Bash
2021-08-31 21:53:03
remove git tag
# Add tags git tag tagName # Push tags git push --follow-tags # Delete locally git tag -d tagName # Delete remote tag: git tag -d tagName git push origin :tagName
Add solution
Shell/Bash
2021-08-31 18:52:01
git reverse last push
git reset --hard <revision_id_of_last_known_good_commit> git push --force
Add solution
Shell/Bash
2021-08-31 16:51:02
git add tag
#from git 1.8.3 you can use git push --follow-tags #single tag push git push origin <tag_name> #All tags (if possible use --follow-tags 'cause it's safer) git push --tags
Add solution
Shell/Bash
2021-08-31 06:04:02
git create branch
// 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-08-31 04:34:03
git create new branch
// 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-08-30 22:01:02
commit no verify
git commit -m "message" --no-verify git push --no-verify
Add solution
Shell/Bash
2021-08-30 18:40:02
git revert 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-08-30 17:13:02
git checkout new branch
//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
Shell/Bash
2021-08-30 09:13:02
git create empty branch
// 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.