• [备忘]git常用命令


    网站有点儿久没有维护(因为去做其他事情了呗),现在空下来,回来改了网站的一些东西,却忘记了git的一些常用的命令,于是便写下这篇文,方便查阅,免得每次都去看手册(毕竟我懒啊!!)

    检查当前文件状态:git status

    跟踪新文件,暂存已修改文件:git add <file>

    打带注释的标签:git tag -a <tag> -m ""

    在历史版本上打标签:git tag -a <tag> 9fceb02

    查看指定标签的版本信息:git show <tag>

    带注释提交:git commit -m ""

    新建分支:git branch <new-branch>

    分支改名:git branch -m <old-branch> <new-branch>

    分支删除:git branch -d <branch>

    分支变基:git rebase <branch>

    分支合并:git merge <branch>

    查看已|未合并的分支:git branch [--merged] | [--no-merged]

    切换到分支:git checkout <branch>

    以行形式显示提交历史:git log --pretty=oneline

    将master分支推送到远程仓库:git push <remote> master

    将指定标签推送到远程仓库:git push <remote> [tagname]

    推送所有标签到远程呢个仓库:git push <remote> [--tags]

  • 相关阅读:
    hdu4291 A Short problem
    UVA
    HDU
    Be Geeks!
    HDU
    hdu6559 The Tower
    胜利大逃亡(续) + Maze
    Stealing Harry Potter's Precious
    hdu5172 GTY's gay friends
    Log Concave Sequences Gym
  • 原文地址:https://www.cnblogs.com/yiven/p/8900433.html
Copyright © 2020-2023  润新知