How to Init Local Project and Push to Git Server

How to init Local project and push it to git server

  1. Create local project
1
git init
  1. Create a repositories on git server
1
https://mygitserver/my/myproject.git
  1. Add remote origin
1
git remote add origin https://mygitserver/my/myproject.git
  1. Pull remote master branche and merge it with local master branche.
1
git pull origin master:master
  1. Push local branch to remote
1
git push -u origin master
  1. Add local project and push it on git server
1
2
3
git add -A
git commit -m "Inistal at first"
git push --set-upstream origin master
Licensed under CC BY-NC-SA 4.0
Last updated on Nov 08, 2024 12:49 UTC
Built with Hugo
Theme Stack designed by Jimmy