git branch
PS E:\gitpre> git branch
* main
PS E:\gitpre> git branch dev
PS E:\gitpre> git checkout dev
Switched to branch 'dev'
PS E:\gitpre> git branch
* dev
main
PS E:\gitpre> git add .
PS E:\gitpre> git commit -m "dev first commit"
[dev e93eddb] dev first commit
1 file changed, 6 insertions(+)
PS E:\gitpre> git push
fatal: The current branch dev has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin dev
To have this happen automatically for branches without a tracking
upstream, see 'push.autoSetupRemote' in 'git help config'.
PS E:\gitpre> git push --set-upstream origin dev
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 28 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 337 bytes | 337.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
remote:
remote: Create a pull request for 'dev' on GitHub by visiting:
remote: https://github.com/Heaticy/gitpre/pull/new/dev
remote:
To https://github.com/Heaticy/gitpre.git
* [new branch] dev -> dev
branch 'dev' set up to track 'origin/dev'.