$git clone "Clone with HTTPS(自己生成的地址,如:https://github.com/******(用户名)/test.git)"
这时在你git第位置会有GitHub上有的项目名称,
创建文件
$touch test.txt
添加到git
$git add . (. 表示添加所有)
提交
$git commit -m "test" (" " ,引号中的内容随便填写 )
提交到GitHub
$ git push origin master
403报错处理::::error: The requested URL returned error: 403 Forbidden while accessing https://github.com/flyoneday/test.git/info/refs
修改 config文件
$vim .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = https://github.com/*****/test.git(**** 是你自己的用户名)
[branch "master"]
remote = origin
merge = refs/heads/master
把url 改成 url = https://*****@github.com/*****/test.git(**** 是你自己的用户名)
然后重新执行命令
$git push origin master
执行成功,文件 test.txt成功上传到GitHub上