GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Git操作 · Issue #20 · Wscats/articles

Git操作 #20

New issue
Copy link
New issue
Copy link
Closed
Closed
Git操作#20
Copy link
Labels
notes

Description

@Wscats
Wscats
opened on May 21, 2016
Issue body actions

git log
查看我们修改过的历史记录
image

git reset --hard commit id
这是回退到某个版本,commit id号可以只是截取开始的一部分
image

dir
查看文件夹目录里面的所有文件

cat
打印某个文件
image

git reflog
查看记录你执行过的每一次命令
image

git checkout
切换到某个分支
image

git status
push前看看修改过了什么文件
image

git branch -d xxxx
删除本地分支,注意在当前这个分支不能删除自己,只能切换到其他分支再删除当前的这个分支
image

git branch -a
查看本地和远程分支
image

git merge xxx
合并xxx分支到当前分支
image

git add [<file>]
添加文件到缓存区,也可以 "git add ." 添加所有文件到缓存
image

git diff [<file>]
比较当前文件和暂存区文件差异
image

git checkout [<file>]
回滚指定文件
image

Activity

  1. Wscats
    added
    notes
    on Jun 3, 2016
  2. MrZhangDQ commented on Oct 26, 2016

    @MrZhangDQ
    MrZhangDQ
    on Oct 26, 2016
    More actions

    看不够的感觉,

  3. Wscats
    closed this as completedon Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    notes

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.