Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
wiki-git
wiki-git
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • 互联网应用开发
  • wiki-gitwiki-git
  • Wiki
  • Home

Home · Changes

Page history
wangqs created page: home authored Jun 02, 2016 by 互联网应用开发's avatar 互联网应用开发
Hide whitespace changes
Inline Side-by-side
Showing with 39 additions and 0 deletions
+39 -0
  • home.md home.md +39 -0
  • No files found.
home.md 0 → 100644
View page @ 4923f331
### 安装
1. windows https://git-for-windows.github.io/
2. mac https://sourceforge.net/projects/git-osx-installer/
3. ``ubuntu sudo apt-get install git``
### 简单使用
1. 初始化一个目录为git仓库
```
mkdir my_first_git_rep
cd my_first_git_rep
git init
touch README.md
echo "hello git" >> README.md
git add .
git commit -m readme
```
2. 从服务端获取一个项目,类似 svn co
```
git clone git@tech.pingansec.com:wangqs/wiki-git.git
```
3. 将本地的代码推送到远程
```
git push origin master
```
4. push 出现reject
```
git pull --rebase origin master
```
5. 把本地已存在的项目推送到远程
```
git remote add origin git@tech.pingansec.com:wangqs/wiki-git.git
```
Clone repository
  • Home