Git使用小结

安装

在Linux系统中安装Git(以Ubuntu为例)
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git
在Mac OS中安装Git
brew install git
在Windows系统中安装Git

下载Git并安装 https://git-scm.com/download/win


配置

git config --global user.name "your git username"

git config --global user.email "your email address for git"

添加文件到repository

首先切换路径到本地repository,写明要commit到本地repository的文件:

git add .

commit刚才添加到本地repository的文件并添加更新说明信息:

git commit -m "Add new files"

push所做的改变到GitHub:

git push origin your-branch


猜你喜欢

转载自blog.csdn.net/u012111475/article/details/80048837