Git equivalents of most common Mercurial commands?

前端 未结 4 576
南笙
南笙 2020-12-02 03:33

I\'ve been using Mercurial but would like to do a quick demo of Git.

What are the Git equivalents of:

hg init . # start a project in the current dire         


        
4条回答
  •  不知归路
    2020-12-02 04:13

    Mercurial:

    hg init . # start a project in the current directory
    hg addremove # look for any added or deleted files
    hg commit -m "comment" # commit any uncomitted changes
    hg status # what have i changed since the last commit?
    

    Git Equivalents:

    git init
    git add -A
    git commit -am "comment" # -a is not necessary along with the above add -A
    git status
    

提交回复
热议问题