Full Steps to start a git project

Hey guys! Here are some tips for you to start a git project from creating a repository to running the project as a team.

Full Steps to start a git project

  1. Create a remote Gitee repository.
  2. Create new branches as you wish. (Generally, you should create several branches as many as your team member)
  3. Create a local folder to retrieve initial files from the remote Gitee repository.
  4. Open the local folder with VS Code.
  5. Use "Ctrl + Shift + ` " to open terminal in VS Code.
  6. Next, follow the steps to gitify your local folder.
    • git init - initialized empty Git repository
    • git remote add origin https://gitee.com/xxxx/xxxx.git - add remote repository
    • git pull origin <remote_branch_name> (like git pull origin dev_example) - pull and obtain remote code to local folder
    • git checkout -b <local_branch_name> (NOTICE: the <local_branch_name> should be exactly the same as remote one. Like git checkout -b dev_example) - create local branch to associate with remote one
  7. So far, you have clone the project to your local folder which is connected to the remote repository as well.
  8. To synchronize local change to remote one, please use these steps below.
    • git add "newChageFile.xx" - add new file
    • git commit -m "new change explanation" - add change explanation
    • git push origin <your_branch_name> (like git push origin dev_example) - push your change to your remote branch
  9. Until now, for a common developer in a team, these commands are far enough.

If you are going to merge members’ change to the project, you should follow the additional steps below.

  1. git checkout master - go to master branch
  2. git pull origin <member_branch_name> (like git pull origin dev_example) - get member’s change
  3. git push origin master - update this member’s change to the project
  4. Repeat steps 1-3 until all members’ changes have been updated.
According to my limited level, this article might have some problems. Please feel free to contact any other skilled team members once you get some puzzle. Hopefully, it helps.
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值