Git for Android

Command line instructions
Git global setup

git config --global user.name "***"
git config --global user.email "******"

Create a new repository

git clone http://git.************
cd yuxing
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master

Existing folder // 文件夹存在

cd existing_folder
git init
git remote add origin http://git.*********
git add .
git commit -m "Initial commit"
git push -u origin master

Existing Git repository //当已经存在git 远程仓库,想要新建一个远程仓库

cd existing_repo
git remote rename origin old-origin //删除当前git 远程仓库
git remote add origin http://git.********* //重新指定仓库
git push -u origin --all
git push -u origin --tags

你可能感兴趣的:(Git for Android)