git上传文件到项目

 

Git 全局设置

git config --global user.name "hahahaha"
git config --global user.email "[email protected]"

创建新储存库

git clone https://gitlab.com/hahahaha/test.git
cd test
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master

Push 现有文件

cd 你的目录
git init
git remote add origin https://gitlab.com/hahahaha/test.git
git add .
git commit -m "Initial commit"
git push -u origin master

Push 现有储存库

cd 你的目录
git remote rename origin old-origin
git remote add origin https://gitlab.com/hahahaha/test.git
git push -u origin --all
git push -u origin --tags

你可能感兴趣的:(java,其他,git)