美文网首页
git 提交

git 提交

作者: 路尔轩 | 来源:发表于2019-07-20 18:17 被阅读0次
Administrator@Q4DGPPXCSFPJREV MINGW64 ~/Desktop/test
$ git init
Initialized empty Git repository in C:/Users/Administrator/Desktop/test/.git/

Administrator@Q4DGPPXCSFPJREV MINGW64 ~/Desktop/test (master)
$ git add README.md
fatal: pathspec 'README.md' did not match any files

Administrator@Q4DGPPXCSFPJREV MINGW64 ~/Desktop/test (master)
$ echo "# test" >> README.md

Administrator@Q4DGPPXCSFPJREV MINGW64 ~/Desktop/test (master)
$ git commit -m "first commit"
On branch master

Initial commit

Untracked files:
        README.md

nothing added to commit but untracked files present

Administrator@Q4DGPPXCSFPJREV MINGW64 ~/Desktop/test (master)
$ git add .
warning: LF will be replaced by CRLF in README.md.
The file will have its original line endings in your working directory

Administrator@Q4DGPPXCSFPJREV MINGW64 ~/Desktop/test (master)
$ git commit -m "first commit"
[master (root-commit) e13205d] first commit
 2 files changed, 2 insertions(+)
 create mode 100644 README.md
 create mode 100644 aa.txt

Administrator@Q4DGPPXCSFPJREV MINGW64 ~/Desktop/test (master)
$ git remote add origin https://github.com/luerxuan/test.git

Administrator@Q4DGPPXCSFPJREV MINGW64 ~/Desktop/test (master)
$ git push -u origin master
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 4 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (4/4), 269 bytes | 269.00 KiB/s, done.
Total 4 (delta 0), reused 0 (delta 0)
To https://github.com/luerxuan/test.git
 * [new branch]      master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.

Administrator@Q4DGPPXCSFPJREV MINGW64 ~/Desktop/test (master)
$

相关文章

  • GIT命令

    新建路径: git clone 提交修改: git add . 本地提交: git comm...

  • 关于Git

    首次提交5条 git init .......git 重复提交3条 git add . git commit -m...

  • git常用命令

    git add . git commit -m "message"提交,其中message是提交的信息。 git ...

  • git 常用的命令

    git status 检测状态 git add . 提交的代码显示 git commit -m "备注" 提交...

  • 05_git版本回退和版本比较

    git log git的历史提交记录 commit 后面的hash值是 git提交id git log --pre...

  • 《git权威指南笔记》

    修改提交说明 git commit --amend修改最新提交的提交说明 git rebase -i

  • git撤销与回滚

    git撤销已经push的提交 git log 查看提交记录 git reset --soft commit_id ...

  • git常用命令总结

    目录 拆pr git log 查看历史提交 git reset 回滚到提交前,但是这时候未提交文件还在 git a...

  • Git 提交代码到远程分支

    环境:windows 提交方式:Git Bash 命令行提交 1.进入需要提交的项目Git目录右键选择Git Ba...

  • git 代码合并

    git 代码合并 git status 查看下当前代码状态,有需要提交的就提交,没用需要提交的就保持原样 git ...

网友评论

      本文标题:git 提交

      本文链接:https://www.haomeiwen.com/subject/fhiulctx.html