git
hongtoushiziyuan
这个作者很懒,什么都没留下…
展开
-
git reset简介
转载自:http://blog.csdn.net/hudashi/article/details/7664464一、基本篇在git的一般使用中,如果发现错误的将不想staging的文件add进入index之后,想回退取消,则可以使用命令:git reset HEAD <file>...,同时git add完毕之后,git也会做相应的提示,比如:引用# Change...原创 2014-05-25 17:22:43 · 110 阅读 · 0 评论 -
centos6安装git2.x
安装 repo package: yum install http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpm安装 Git 2.x: yum install git确定是否安装成功 git --version摘选自: h...2017-02-21 21:32:04 · 210 阅读 · 0 评论 -
在GitHub上管理项目
转载自: http://www.cnblogs.com/mengdd/p/3447464.html 新建repository 本地目录下,在命令行里新建一个代码仓库(repository) 里面只有一个README.md 命令如下: touch README.md git init 初始化repository git add README.md 将R...原创 2016-04-12 10:47:38 · 85 阅读 · 0 评论 -
Caching your GitHub password in Git
转载自: https://help.github.com/articles/caching-your-github-password-in-git/ If you're cloning GitHub repositories using HTTPS, you can use a credential helper to tell Git to remember yo...原创 2016-01-14 15:28:31 · 96 阅读 · 0 评论 -
Git Credential Caching on Mac OS X
Git Credential Caching on Mac OS X Password cachingYou can set up git so that it won't ask you to type your username and password every time you talk to a remote server. To do this, yo...原创 2016-01-07 12:26:26 · 119 阅读 · 0 评论 -
git 误删分支恢复方法
首先用以下步骤创建一个新分支,修改一些文件后删除,以便进行恢复。1.创建分支 abcgit branch abc112.查看分支列表git branch -a abc* develop remotes/origin-dev/develop123412343.切换到abc分支,随便修改一下东西后 c...原创 2017-04-13 16:02:29 · 749 阅读 · 0 评论 -
git tag — 标签相关操作
标签可以针对某一时间点的版本做标记,常用于版本发布。列出标签$ Git tag # 在控制台打印出当前仓库的所有标签$ git tag -l ‘v0.1.*’ # 搜索符合模式的标签打标签git标签分为两种类型:轻量标签和附注标签。轻量标签是指向提交对象的引用,附注标签则是仓库中的一个独立对象。建议使用附注标签。# 创建轻量标签$ git tag v0.1.2-light...原创 2017-04-11 17:11:12 · 173 阅读 · 0 评论 -
Creating a Shared Repository; Users Sharing The Repository
转载自: http://www.gitguys.com/topics/creating-a-shared-repository-users-sharing-the-repository/Commands discussed in this section:git init –baregit clonegit remotegit pullgit pushScen...原创 2015-07-10 17:51:45 · 101 阅读 · 0 评论 -
Git push 报错 "error: failed to push some refs to " 解决
Git push 报错 "error: failed to push some refs to " .此问题出现的原因是:由于远程仓库中代码版本与本地不一致冲突导致的。由于我在第一次git pull --rebase 代码后,准备push的时候,有别人往线上又提交了代码。所以出现此问题。解决方案:1: git pull 2:有冲突的话解决冲突。3:git push...2014-08-06 17:51:40 · 449 阅读 · 0 评论 -
git回滚并强制提交
git 回滚到某个版本: git reset --hard 版本号强行回滚远程服务器: git push -f一片比较好的链接:http://www.douban.com/note/189603387/2014-06-23 16:02:33 · 1153 阅读 · 0 评论 -
git not currently on any branch
先说自己出现这个问题的原因吧: 由于网络问题,git pull ,git push 结果出现了问题,但是由于网络,有些错误也没能够及时返回。这种错误也遇到过多次,今天经过多次尝试终于把问题解决了。 步骤如下: 1: git rebase --abort 2: git checkout master 3: gi...原创 2013-08-20 11:03:14 · 2245 阅读 · 0 评论 -
git stash
stash命令可以很好的解决这样的问题。当你不想提交当前完成了一半的代码,但是却不得不修改一个紧急Bug,那么使用’git stash’就可以将你当前未提交到本地(和服务器)的代码推入到Git的栈中,这时候你的工作区间和上一次提交的内容是完全一样的,所以你可以放心的修 Bug,等到修完Bug,提交到服务器上后,再使用’git stash apply’将以前一半的工作应用回来。...原创 2013-08-15 17:54:23 · 68 阅读 · 0 评论 -
git项目的remote地址替换
This week I'll show you how you can move a full Git repository from one remote server to another. The steps I'm using even allow you to choose which branches and tags to include.Let’s call the orig...原创 2018-04-13 14:44:05 · 1844 阅读 · 0 评论