Git for humans

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

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容