zl程序教程

您现在的位置是:首页 >  工具

当前栏目

Git应用—01初始化项目

应用项目Git 01 初始化
2023-09-11 14:19:52 时间

 

1.环境变量
GIT_HOME      D:\GreenSoftware\PortableGit 
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