I deleted my previous git origin, and created a new one. I did git add . and git commit. But it will update changes, how do i push everything into the new origin
To push the all branches to a remote git, we can use the git push command followed by the --all flag and origin. This will create a track with the local branches to the remote branches.
If you use git branches a lot, you'll often push each branch after each commit. This takes time… Instead of pushing every single branch you can do git push --all origin . This will push all commits of all branches to origin. That really simple!
Run the git remote set-url --add --push origin git-repository-name command where git-repository-name is the URL and name of the Git repository where you want to host your code. This changes the push destination of origin to that Git repository.
(works with git 1.8.4)
If you want to push all branches at once:
git push <URL> --all
To push all the tags:
git push <URL> --tags
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With