git学习,git上建立自己的项目
2013-03-11 11:15
267 查看
官方帮助文档:
https://help.github.com/articles/create-a-repo
登录github,点 New Repository.如下面图所示,
2.push
https://help.github.com/articles/create-a-repo
登录github,点 New Repository.如下面图所示,
新建一个文件,初始化本地库git init,如下:
Step 1: Create the README file
In the prompt, type the following code:mkdir ~/Hello-World # Creates a directory for your project called "Hello-World" in your user directory cd ~/Hello-World # Changes the current working directory to your newly created directory git init # Sets up the necessary Git files # Initialized empty Git repository in /Users/you/Hello-World/.git/ touch README # Creates a file called "README" in your Hello-World directory
提交自己的文件到库中,用到git add ,git commit命令,如下:
Step 2: Commit your README
Now that you have your README set up, it's time to commit it. A commit is essentially a snapshot of all the files in your project at a particular point in time. In the prompt, type the following code:More about commits
git add README # Stages your README file, adding it to the list of files to be committed git commit -m 'first commit' # Commits your files, adding the message "first commit"
提交自己的代码到github上,
1,先添加远端,git remote add xxxxx2.push
Step 3: Push your commit
So far everything you've done has been in your local repository, meaning you still haven't done anything on GitHub yet. To connect your local repository to your GitHub account, you will need to set a remote for your repository and push your commits to it:More about remotes
git remote add origin https://github.com/username/Hello-World.git # Creates a remote named "origin" pointing at your GitHub repository git push origin master # Sends your commits in the "master" branch to GitHub
相关文章推荐
- git--tortoise小乌龟可视化工具结合csdn的code中心建立自己的项目管理
- 使用git和github管理自己的项目---基础操作学习
- 怎么针对自己项目工程建立Repo管理多个git仓库?
- 使用git和github管理自己的项目---基础操作学习
- git学习--repo批量创建远端仓库----建立自己的android代码仓库
- Mac升级git版本 以及 使用git和github管理自己的项目---基础操作学习
- [转载]cocos2d-x学习笔记3:更改HelloWorld,建立自己的小项目
- 使用git和github管理自己的项目---基础操作学习
- 使用git和github管理自己的项目---基础操作学习
- 使用git和github管理自己的项目---基础操作学习
- 使用git和github管理自己的项目---基础操作学习
- Git与GitHub学习笔记(六)使用 Github Pages 管理项目文档
- 【面向对象课程项目:纸牌】Java实例学习(三):对自己代码的修正与加壳(仍然要对比源码)
- 建立自己的git服务器
- 如何将自己的项目添加git管理,新增和删除GitHub项目
- SSH框架学习(一、建立web项目)
- Git使用gitignore建立项目过滤规则
- 学习安卓开发过程之中,自己倒腾的两个小项目,一个是音乐播放器,一个是天气预报。
- Git学习系列之Git基本操作推送项目(图文详解)
- java学习之旅15、16--eclipse开发环境的使用_建立java项目_运行java项目,eclipse运行程序的问题(src和bin问题)_debug模式