Show the remote-tracking branches. -a --all Show both remote-tracking branches and local branches. --current With this option, the command includes the current branch to the list of revs to be shown when it is not given on the command line. ...
Show the remote-tracking branches. -a --all Show both remote-tracking branches and local branches. --current With this option, the command includes the current branch in the list of revs to be shown when it is not given on the command line. ...
将本地仓库代码提交到远程仓库 git push origin current_branch 将当前分支推送到origin主机(在远程主机新建分支) git push -u origin haha 将本地的haha分支推送到远程origin主机(远程主机没有haha分支,则新建) git push -u origin main 加了-u,指定默认主机,以后的push, 可以直接用git push 代替git push orig...
# See the current status of your repository # (which files are changed / new / deleted) git status # Show the differences between the uncommitted files # and the last commit in the current branch git diff # Add the changes to the index and commit git add . && git commit -m "More c...
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. ...
# x, exec <command> = run command (the rest of the line) using shell # d, drop <commit> = remove commit # l, label <label> = label current HEAD with a name # t, reset <label> = reset HEAD to a label # m, merge [-C <commit> | -c <commit>] <label> [# <oneline>] ...
pull Fetch from and integrate with another repository or a local branch push Update remote refs along with associated objects 'git help -a' and 'git help -g' list available subcommands and some concept guides. See 'git help <command>' or 'git help <concept>' ...
Here is a step-by-step explanation of how to Git create branch: To create a new branch, use the command git checkout -b [branch_name], where [branch_name] is your desired name for the new branch. It will create a copy of the codebase and put you in it so that any changes ma...
The command is branch followed with a name for the new branch. git branch <branchname> When you execute the branch command, it (by default) uses the pointer of the current branch and create a new branch that points to the same commit as the current branch. The branch command doesn't ...
git reflogis a very useful command in order to show a log of all the actions that have been taken! This includes merges, resets, reverts: basically any alteration to your branch. ) If you made a mistake, you can easily redo this by resettingHEADbased on the information thatrefloggives ...