Git on Linux

How to use git in linux OS

Git global setup

git config --global user.name "your username"

git config --global user.email " your email address "

if this is your first time to use git in current system, you shold Add public key to gitlab service

ssh-keygen -t rsa -C “your email address”

there will be id_rsa file and id_rsa.pub file. The next is adding public ssh keys which are in id_rsa.pub file to gitlab website

Create a new repository

git clone git@211.83.111.222:luoxingcheng/darknet.git   //download project

cd darknet

git checkout your-branch //switch to your branch, if needed.

git checkout -b new-branch // based on current branch to build a new branch, if                                  needed

touch README.md //this is an example of development phase,

git add README.md     // add the files which you have changed or added to temporary storage 

git commit -am "add README" //form to a patch and push your patch to local  branch

git push origin your-branchyour-branch //push your changes to remote branch

Existing folder or Git repository

cd existing_folder

git init

git remote add origin git@211.83.111.222:luoxingcheng/darknet.git

git add .

git commit

git push origin your-branchyour-branch

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值