Github

如何将一个已存在的目录转换为一个 Git 项目并托管到 GitHub 仓库https://itgeeker.net/how-to-an-existing-git-initiate-foler/

在Windows下使用Git Bash,用的是Linux命令,常用几个文件操作命令如下:

Windows命令 Linux命令 意义
cd e:xxx cd /e/xxx 切换到xxx目录
cd pwd 显示当前目录路径
dir ls 列出当前目录内容
copy nul xxx.txt touch xxx.txt 生成名为xxx.txt的空文件
del xxx.txt rm xxx.txt 删除xxx.txt文件
md xxx mkdir xxx 建立xxx目录
rd /s xxx rm -r xxx
删除xxx目录

2018/03/06

git command

1.git init  初期化git directory

2.git clone URL

  copy  remote repository to local

3. git status

4.git diff

5.git log

6.git add xxxx

 add modified file to commit

5. git commit( git commit  -am "comment" , -a add all modified to commit)

6.git push

  submit to remote repository

7. git branch

list branch and * represent to current branch

7.1 git branch branchname

   create branch

    7.2 git branch -v

 list branch with last commit num...

8 git checkout branchname

 switch branch

9 git merge branchname1

  merge branch to current branch

   show git branch list

10 git pull

  download new commit from remote repository

原文地址:https://www.cnblogs.com/charles999/p/7270802.html