Git 명령줄 항목 제출 서버 단계

1253 단어
Git base operate
1.   pwd 
mkdir folder

2. git 
git init

3.  
touch README.md

4.  
git add.

5.  
git commit -m ‘ 1’

6.  
git push -u origin master


Git branch
git branch -r  

git branch -a  

git checkout -b master  

git branch  


Git global setup
git config --global user.name "zhouen"

git config --global user.email "[email protected]"


Create a new repository
git clone http://192.168.1.134/zhouen/test.git

cd test

touch README.md

git add README.md

git commit -m "add README"

git push -u origin master

git pull origin master

git clone -b master http://192.168.1.134/zhouen/test.git   


Existing folder
cd existing_folder

git init

git remote add origin http://192.168.1.134/zhouen/test.git

git commit -m "Initial commit"

git push -u origin master

git add .      

git add —all      

git remote -v

git remote remove remote_name

git remote set-url remote-name new_url


Existing Git repository
cd existing_repo

git remote add origin http://192.168.1.134/zhouen/test.git

git push -u origin --all

git push -u origin --tags

좋은 웹페이지 즐겨찾기