github创建一个项目到本地关联,提交代码steps

1. github上创建ops仓库;
2. 在132服务器的/home/wfq/github/目录下克隆刚创建的ops仓库;

执行如下命令

git clone git@github.com:CodingBruceWang/ops.git
3. 132本地克隆了ops后,将ops的所有代码从/home/wfq/ops目录拷贝到/home/wfq/github/ops目录下,进入到/home/wfq/ops目录,执行cp -R * ~/github/ops
4. 拷贝后,进入到/home/wfq/github/ops目录

依次执行
a. git add *
b. git commit -m "all the codes of ops; first time to commit;"
c. git push origin
至此,github和132服务器本地代码同步

猜你喜欢

转载自blog.csdn.net/wang725/article/details/80863381