git 命令
1 删除分支
git push origin :branch name(Task_******) //删除远程分支
git branch -D branch name(Task_******) //删除本地分支
2查看分支
git branch 查看本地分支
git branch -a 查看本地和远程分支
3 查看分支创建时间
git reflog show --date=iso branchname
4 git push upstream 后报错
Warning: Permanently added 'github.ibm.com,169.45.244.167' (ECDSA) to the list of known hosts.
To github.ibm.com:ptt/track.git
! [rejected] northstar -> northstar (non-fast-forward)
error: failed to push some refs to 'git@github.ibm.com:ptt/track.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
git pull
git push test1:test1
5 rm -rf CampusInterview/
git clone git@github.ibm.com:test/CampusInterview.git
git branch -avv
git remote rm upstream
6 clone 项目
git clone git@github.ibm.com:chidl/file_name
cd file_name
git remote -v
git remote add upstream git@github.ibm.com:chidl/file_name
git remote -v