Ubuntu 系统下使用 git 命令行交互 github

来源:互联网 发布:jquery 加载js 编辑:程序博客网 时间:2024/06/16 10:39
=== 相关命令 ===
git init
git add .
git commit -m "注释"
git remote add origin https://url
git pull origin master
git push -u origin master


=== 上传代码(push )=== 
git add .
git commit -m "注释"     // 有可能需要你先执行 git config --global user.email "your email" 
git push -u origin master    // 注意:指定了origin master,当前目录要在对应仓库的根目录下。

输入github的账号和密码


示例如下所示:

hcq@hcq-home:~/document/github_daily/MachineLearning_DeepLearning$ git add .hcq@hcq-home:~/document/github_daily/MachineLearning_DeepLearning$ git commit -m 'added rcnn-tflearn by hcq 20171128'*** Please tell me who you are.Run  git config --global user.email "you@example.com"  git config --global user.name "Your Name"to set your account's default identity.Omit --global to set the identity only in this repository.fatal: unable to auto-detect email address (got 'hcq@hcq-home.(none)')hcq@hcq-home:~/document/github_daily/MachineLearning_DeepLearning$ git config --global user.email "836999690@qq.com"hcq@hcq-home:~/document/github_daily/MachineLearning_DeepLearning$ git commit -m 'added rcnn-tflearn by hcq 20171128'[master 9eb87cf] added rcnn-tflearn by hcq 20171128 11 files changed, 2083 insertions(+) create mode 100644 rcnn-tflearn/RCNN.md create mode 100644 rcnn-tflearn/RCNN_output.py create mode 100644 rcnn-tflearn/fine_tune_RCNN.py create mode 100755 rcnn-tflearn/image_1173.jpg create mode 100644 rcnn-tflearn/preprocessing_RCNN.py create mode 100644 rcnn-tflearn/refine_list.txt create mode 100644 rcnn-tflearn/svm_train/1.txt create mode 100644 rcnn-tflearn/svm_train/2.txt create mode 100644 rcnn-tflearn/testimg7.jpg create mode 100644 rcnn-tflearn/train_alexnet.py create mode 100644 rcnn-tflearn/train_list.txthcq@hcq-home:~/document/github_daily/MachineLearning_DeepLearning$ git push -u origin masterUsername for 'https://github.com': 836999690@qq.comPassword for 'https://836999690@qq.com@github.com': Counting objects: 15, done.Delta compression using up to 8 threads.Compressing objects: 100% (15/15), done.Writing objects: 100% (15/15), 108.42 KiB | 36.14 MiB/s, done.Total 15 (delta 4), reused 0 (delta 0)remote: Resolving deltas: 100% (4/4), done.To https://github.com/Houchaoqun/MachineLearning_DeepLearning.git   c3160ca..9eb87cf  master -> masterBranch 'master' set up to track remote branch 'master' from 'origin'.


=== 更新本地代码(pull )=== 

git pull origin master

原创粉丝点击