Git项目的初始化

快速设置— 如果你知道该怎么操作,直接使用下面的地址

[email protected]:username/myproject.git

我们强烈建议所有的git仓库都有一个READMELICENSE.gitignore文件

Git入门?查看 帮助 , Visual Studio / TortoiseGit / Eclipse / Xcode 下如何连接本站, 如何导入项目

简易的命令行入门教程:

Git 全局设置:

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

  

创建 git 仓库:

mkdir nowcoder
cd nowcoder
git init
touch README.md
git add README.md
git commit -m "first commit"
git remote add origin [email protected]:stardsd_admin/nowcoder.git
git push -u origin master

  

已有项目?

cd existing_git_repo
git remote add origin [email protected]:stardsd_admin/nowcoder.git
git push -u origin master

  


error

error: src refspec master does not match any.  
error: failed to push some refs to 'ssh://xxxxx.com/project.git'

# The most probable reason for this error is that all the files are untracked and have not been added. 
git add --all 
#in case you wish to add all the files 
#Or you can selectively add files. Then 
git commit -m "Initial comment"
git push origin master

  

猜你喜欢

转载自www.cnblogs.com/sddai/p/9508982.html