Giter VIP home page Giter VIP logo

skmaven's Introduction

SKMaven

一个模仿慕课的秒杀项目

skmaven's People

Contributors

intellijboy avatar

Watchers

 avatar

Forkers

cloudbyside

skmaven's Issues

Git相关操作指南

1.git config -l 查看全局用户信息配置

2.git coonfig user.name = "liuburu" 配置用户名

3.git add Hello.java 添加文件到暂存区

4.git commit -m "注释语" 添加文件到工作区

5.git status 查看工作区文件状态

6.git log -pretty=online 版本格式显示

7.git reset --hard head~1 回退到上一个版本

8.git reflog 显示可以穿梭的历史版本信息,以及简写版本信息

9.git reset --hard e9a40a4 回退到指定的版本

10.git diff head Hello.java 与前一个版本作比较

11.git remote add origin url.. 把github与本地仓库相关联

12.git push -u origin master 把本地内容推送到github上

13.git remote -v 查看远程服务器已经存在的版本

14.git remote rm test 删除远程test仓库

15.git commit -a -m "一步提交操作"

16.git clone url 克隆远程仓库

17.git branch brh 创建一个分支

18.git branch 查看分支

19.git checkout brh 切换分支

20.git branch -d brh 删除分支

21.git checkout -b brh 创建并且切换分支

22.git push brh 推送分支到远程仓库

23.git push origin --delete brh 删除远程分支

24.git branch -m brh newBrh 分支重命名

25.git branch -a/-r/-l 查看全部/远程/本地分支

26.git branch -D newBrh 删除分支(分支还未合并,强制删除)

27.git push origin --delete newBrh / git brh newBrh +git push origin newBrh 推送空分支

28.Git自动解决冲突与手动解决冲突

29.git log --graph --pretty=oneling 图形显示日志

30.【本地-->远程】
意思:如有没有本地仓库使用第一种方法与远程仓库关联
如果有本地仓库,那么就是用第二种方法与远程仓库关联
We recommend every repository include a README, LICENSE, and .gitignore.
…or create a new repository on the command line

echo "# gitdemo" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/kakaluote444/gitdemo.git
git push -u origin master
…or push an existing repository from the command line

git remote add origin https://github.com/kakaluote444/gitdemo.git
git push -u origin master
…or import code from another repository
You can initialize this repository with code from a Subversion, Mercurial, or TFS project.

Import code

31.怎么同步远程仓库到本地【远程-->本地】
·git remote -v 查看远程仓库
·git fetch origin master 把远程仓库orgin的master分支下的代码下到本地的origin/master分之下
·git log -p master..origin/master 比较两个版本的差别
·git merge origin/master
·git fetch orgin master:temp
·git diff temp
·git merge temp

 git pull origin master(相当于是从远程获取最新版本并merge到本地)

32.推送分支到远程分支以及删除远程分支

 git push origin --delete lxh 删除远程分支
 git branch lxh + git push origin :lxh  推送空分支删除远程分支

 git branch -d | -D branchname 删除branchname分支
 git branch -m|M oldbranch newbranch 重命名分支,M强制重命名

33.暂存区的使用
git stash 暂存

git pop   回复使用并且删除暂存
git stash apply 暂存应用恢复
git stash drop 暂存删除

34.标签的使用

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.