git --help

来源:互联网 发布:国外大学 canvas 软件 编辑:程序博客网 时间:2024/05/16 11:23

You have an empty repository

To get started you will need to run these commands in your terminal.

New to Git? Learn the basic Git commands

Configure Git for the first time

git config --global user.name "username"git config --global user.email "username@email.com"

Working with your repository

I just want to clone this repository

If you want to simply clone this empty repository then run this command in your terminal.


git clone ssh://git@172.16.0.3:7999/intermediate_test/gateway_testcases_new.git

My code is ready to be pushed

If you already have code ready to be pushed to this repository then run this in your terminal.


cd existing-projectgit initgit add --allgit commit -m "Initial Commit"git remote add origin ssh://git@172.16.0.3:7999/intermediate_test/gateway_testcases_new.gitgit push -u origin master

My code is already tracked by Git

If your code is already tracked by Git then set this repository as your "origin" to push to.

提交修改:

git add <files>

git commit -a    选择需要更新的文件

最后执行以下操作:

cd existing-projectgit remote set-url origin ssh://git@172.16.0.3:7999/intermediate_test/gateway_testcases_new.gitgit push -u origin master

参考链接:https://confluence.atlassian.com/display/STASH0311/Importing+code+from+an+existing+project


0 0
原创粉丝点击