由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Linux版 - GIT 问题
相关主题
dog fart git.RHEL 现在不free了?
how to install amsn in ubuntu 9.04?openSuse 怎么 upgrade 包?KDE 4.4RC3 出来了
kompoZer bug?其实ibus还行
你们觉得应该容忍不公开源码的软件在linux上存在吗?gentoo 和 arch linux有何异同?
zan一个github跪问:intel fortran
calculator gui?万佛,请推荐word frequency tool? (转载)
Google是当之无愧的Linux最大用户[zz]今天貌似FC15发布。
firefox 3.6 b4 cannot restore sessionshow to do this network setup?
相关话题的讨论汇总
话题: git话题: remote话题: fetch话题: changes话题: local
进入Linux版参与讨论
1 (共1页)
D*********s
发帖数: 555
1
我就想干个简单的事情
1,sync with a GIT repo
2. 保留一两个我的local change不被覆盖
我不需要commit, one way sync就好,现在发现很麻烦,这个git还真是得需要
学习,不过我 懒得花时间了。
wy
发帖数: 14511
2

git pull?
use branch

【在 D*********s 的大作中提到】
: 我就想干个简单的事情
: 1,sync with a GIT repo
: 2. 保留一两个我的local change不被覆盖
: 我不需要commit, one way sync就好,现在发现很麻烦,这个git还真是得需要
: 学习,不过我 懒得花时间了。

D*********s
发帖数: 555
3
看来你也不会

【在 wy 的大作中提到】
:
: git pull?
: use branch

wy
发帖数: 14511
4
你zkss

【在 D*********s 的大作中提到】
: 看来你也不会
m******t
发帖数: 2416
5

Use 'git clone' to clone the repo.
For your local changes (assume you are on master):
$ git checkout -b local
Now you can make your local changes and commit them to
this new local branch. Also work on this branch all the time.
Now when you need to pull down new changes, do:
$ git fetch remote
$ git rebase remote/master master
$ git rebase master local
On the last step above you might have some conflicts
if your local changes involve the same files in the new
upstream changes. You'll need to r

【在 D*********s 的大作中提到】
: 我就想干个简单的事情
: 1,sync with a GIT repo
: 2. 保留一两个我的local change不被覆盖
: 我不需要commit, one way sync就好,现在发现很麻烦,这个git还真是得需要
: 学习,不过我 懒得花时间了。

D*********s
发帖数: 555
6
谢谢,我正在clone,然后照你的试试。

【在 m******t 的大作中提到】
:
: Use 'git clone' to clone the repo.
: For your local changes (assume you are on master):
: $ git checkout -b local
: Now you can make your local changes and commit them to
: this new local branch. Also work on this branch all the time.
: Now when you need to pull down new changes, do:
: $ git fetch remote
: $ git rebase remote/master master
: $ git rebase master local

D*********s
发帖数: 555
7
#git fetch remote
fatal: 'remote': unable to chdir or not a git archive
fatal: The remote end hung up unexpectedly
这个是咋回事呢?

【在 m******t 的大作中提到】
:
: Use 'git clone' to clone the repo.
: For your local changes (assume you are on master):
: $ git checkout -b local
: Now you can make your local changes and commit them to
: this new local branch. Also work on this branch all the time.
: Now when you need to pull down new changes, do:
: $ git fetch remote
: $ git rebase remote/master master
: $ git rebase master local

m******t
发帖数: 2416
8

Oh, I just put 'remote' as a placeholder. If you didn't
specify any name at clone time, it should be 'origin'.
Also I think in your case a simple 'git fetch' would
work too.

【在 D*********s 的大作中提到】
: #git fetch remote
: fatal: 'remote': unable to chdir or not a git archive
: fatal: The remote end hung up unexpectedly
: 这个是咋回事呢?

Z****e
发帖数: 2999
9
git stash?

【在 D*********s 的大作中提到】
: 我就想干个简单的事情
: 1,sync with a GIT repo
: 2. 保留一两个我的local change不被覆盖
: 我不需要commit, one way sync就好,现在发现很麻烦,这个git还真是得需要
: 学习,不过我 懒得花时间了。

D*********s
发帖数: 555
10
No, git fetch didn't work, It seemed that git fetch did fetch data but
it didn't merge to my tree.
I feel like I missed something. I'll try again.

【在 m******t 的大作中提到】
:
: Oh, I just put 'remote' as a placeholder. If you didn't
: specify any name at clone time, it should be 'origin'.
: Also I think in your case a simple 'git fetch' would
: work too.

m******t
发帖数: 2416
11

fetch won't do merge. What it does is simply fetching remote changes.
That's exactly why I suggested it instead of pulling directly, because it
then gives you a change to examine the remote changes before merging
them into your local branches, using diff or show-branch.

【在 D*********s 的大作中提到】
: No, git fetch didn't work, It seemed that git fetch did fetch data but
: it didn't merge to my tree.
: I feel like I missed something. I'll try again.

1 (共1页)
进入Linux版参与讨论
相关主题
how to do this network setup?zan一个github
热烈祝贺bitbucket提供git了calculator gui?
OpenVZ VPS上,CentOS 6开机内存占用只有40多MBGoogle是当之无愧的Linux最大用户[zz]
apt-get update巨慢firefox 3.6 b4 cannot restore sessions
dog fart git.RHEL 现在不free了?
how to install amsn in ubuntu 9.04?openSuse 怎么 upgrade 包?KDE 4.4RC3 出来了
kompoZer bug?其实ibus还行
你们觉得应该容忍不公开源码的软件在linux上存在吗?gentoo 和 arch linux有何异同?
相关话题的讨论汇总
话题: git话题: remote话题: fetch话题: changes话题: local