1.git alter username
git config user.name
git config user.email
git config --global user.name "username"
git config --global user.email "email"
2.git del remote files
git status
git rm .idea --cached -r
git rm app.iml --cached -r
git add -A
git status
git commit -m "update gitignore"
git push
3.git fetch upstream
https://help.github.com/articles/fork-a-repo/
git remote add upstream xxxx.git
git fetch upstream
git merge upstream/master
git status
git commit -m "xx"
git push
3.2.https://gist.github.com/CristinaSolana/1885435
git pull upstream master
git merge origin/master --allow-unrelated-histories
one command sync
git fetch upstream
1. git merge upstream/master
2.git merge upstream/develop master
git push
4.transfer remote branch
git remote set-url origin ssh://git-codecommit.us-west-2.amazonaws.com/v1/repos/TestAndroid
git status
git push
4.1.right click mouse--> git Bash Here input git clone <remote url>
4.2.1 copy the file where need under vcs
4.2.2. git status
4.3.git add -A
4.4.git status
4.5.git commit -m "info"
4.6.git push
5.0 git set proxy
git config --global http.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'
cancel proxy
git config --global --unset http.proxy
git config --global --unset https.proxy
切换分支
git checkout xxxx
6.create a new repository
…or create a new repository on the command line
echo "# TEstx" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin git@github.com:montotone/TEstx.git
git push -u origin master
------>git pull origin branchname --allow-unrelated-histories
…or push an existing repository from the command line
git remote add origin git@github.com:montotone/TEstx.git
git push -u origin master
new branch
https://blog.csdn.net/zengxiaosen/article/details/72628724
git cherry-pick
命令的作用,就是将指定的提交(commit)应用于其他分支。
$ git cherry-pick <commitHash>