android 使用 git上传文件到github
2016-08-12 16:39
441 查看
While the EGit plugin for Eclipse is a good option, an even better one would be to learn to use git bash -- i.e., git from the command line. It isn't terribly difficult to learn the very basics of git, and it is often very benefitial to understand some basicoperations before relying on a GUI to do it for you.But to answer your question:First things first, download git from http://git-scm.com/. Then go to http://github.com/ and create an account and repository.On your machine, first you will need to navigate to the project folder using git bash.When you get there you do:
[code]git init[/code]which initiates a new git repository in that directory.When you've done that, you need to register that new repo with a remote (where you'll upload -- push -- your files to), which in this case will be github. You'll get the correct URL from your repo on GitHub.
[code]$ git remote add origin https://github.com/[username]/[reponame].git[/code][/code] You need to add you existing files to your local commit:[code]git add . # this adds all the files[/code]Then you need to make an initial commit, so you do:[code]git commit -a -m "Initial commit" # this stages your files locally for commit. # they haven't actually been pushed yet[/code]Now you've created a commit in your local repo, but not in the remote one. To put it on the remote, you do the second line you posted:git push -u origin --all 转自二:在已经创建了本地文件与github上的rep之间的联系后,提交代码的更新
1)git init2) git status//检测文件改变状况3)git add .//添加所有改变文件3)git commit -m "这里添加提交的注释"4)git push这样就把本地项目修改的代码同步到github里的项目了三:清除已经建立的本地文件与github链接,来源To remove a remote repository you enter:git remote rm origin
相关文章推荐
- Android-git的第一次使用-将本地文件上传到github
- 使用git工具上传代码文件到github
- 使用Git上传文件到GitHub
- mac上使用git上传文件到github
- 使用git工具上传代码文件到github
- 实现使用 Git 命令将电脑上的文件上传到 Github
- Android小记:eclipse下使用git上传(下载)代码至(从)github
- 如何使用Git上传文件到Github(一)
- 使用git上传文件到github
- git使用总结(包含如何上传文件到github)
- Git的简单使用及文件上传到github
- mac上使用git上传文件到github
- 如何使用Git上传文件到Github之tortoiseGit的使用(二)
- Git与GitHub的使用--上传文件与文件夹
- mac系统下使用git,包括给github上传文件
- Github使用.gitignore文件忽略不必要上传的文件
- Git 安装,配置及其使用(怎么将本地文件上传到github)
- 使用git将本地文件上传到github
- Android分别使用HTTP协议和TCP协议实现上传文件 .
- Android应用开发之使用Socket进行大文件断点上传续传