Git应用—01初始化项目

1.环境变量
GIT_HOME      D:GreenSoftwarePortableGit 
Path    %GIT_HOME%cmd;


2.初始化
git config --global user.name "zyx"
git config --global user.email zyx@126.com


3.应用
echo "read me!" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/zyx/test.git
git push -u origin master
git pull origin master

参考
https://blog.csdn.net/u012575819/article/details/50553501

----------------------------------------------------------------------------------------------------------------------------------------------------------------

git push免输入账号和密码方法

1.创建文件,进入文件,输入内容:
cd ~
touch .git-credentials
vim .git-credentials
https://{username}:{password}@github.com

2.在终端下输入:
git config --global credential.helper store

3.打开~/.gitconfig文件,会发现多了一项:
[credential]
helper = store

原文地址:https://www.cnblogs.com/gispathfinder/p/10359836.html