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.

then, run this command:
git init
great! now you get a new repository in you PC

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"


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