将已有的工程代码push到github或者gitlab

执行下面的命令就好了

1
2
3
4
5
git init
git add .
git commit -m "Initial commit"
git remote add origin <project url>
git push -f origin master

不过有时候会在github或者gitlab上将master分支进行保护,所以可能需要先创建一个别的分支,然后merge就好了

参考资料

# git

Comments

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×