美文网首页
Git for humans

Git for humans

作者: 赐我理由在披甲上阵 | 来源:发表于2019-12-15 12:02 被阅读0次

this is a guide that wants to make git for humans

1. git install

here is the URL: https://gitforwindows.org/


2. repository initialization

when git installed, find and open the git bash, and run the command:

mkdir git_one 
cd git_one
pwd

### here is some interpretation
# mkdir: make directory, to create a directory
# cd: get into a directory
# pwd: print working directory, to print current path

ok, you now get into your directory.

image.png

then, run this command:

git init

great! now you get a new repository in you PC


image.png

3. git usecase

  • add file to repository
    create a file test.txt in the directory , content like this and save


    image.png

and then run the command:

git add test.txt

if nothing shows, go on:


git commit -m "commit to repository"

-m is to add a interpretation message "commit to repository"


image.png image.png

if you can see the information like pics, okay you did it.(add file to repository)

git 内部原理
https://zhuanlan.zhihu.com/p/96631135

相关文章

网友评论

      本文标题:Git for humans

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