如果新建的項目沒有進行初始化,,往往會導致這樣的錯誤:
fatal: Not a git repository (or any of the parent directories): .git
gitlab 初始化可以參考以下操作
Git global setup
git config --global user.name "liubit" git config --global user.email "[email protected]"
Create a new repository
git clone [email protected]:liubit/test.git cd test
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
Existing folder or Git repository
cd existing_folder
git init
git remote add origin [email protected]:liubit/test.git git add .
git commit
git push -u origin master