How to push a code from my local env to a brand new repository that does not have any branch yet.
1 Answer
The syntax of git push is:
git push [options] [ […]]
Repository can be a URL to a repository or the name of a configured remote in your repo.
To push local branch "a" to a repository at example.com/repo.git, execute
git push example.com/repo.git a
If you plan on doing that more than once, consider adding a remote:
git remote add examplerepo example.com/repo.git
git push examplerepo a
git pushcan be used to push to a remote repository directly?