Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Git: bring in a file from another branch
- Date: Mon, 11 Jul 2011 16:45:00 +0900
- From: Darren Cook <darren@example.com>
- Subject: Re: [tlug] Git: bring in a file from another branch
- References: <4E1A831E.2080203@example.com>
- User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10
> That brings in all my application code. I'd then read I just specify the > particular commit I want. So this time I'd been careful to use two > different commits in myapp, one for library code, one for my application > files. > > $ git merge 160ef92 > Updating e7a7f3f..160ef92 > Fast-forward > darren_thoughts.txt | 124 +++++++++++ > ... > > Grrr... I.e. it brings in all files from "myapp" [1]. Found it! Use cherry-pick instead of merge: git cherry-pick 160ef92 I actually found this on a page [1] suggesting that was the wrong solution. It was for him, but not for me. His solution was: git checkout myapp lib/abc It gets the latest version of that file from the myapp branch. But it doesn't bring in the commit messages. So, compared to cherry-pick you then have to use commit. Darren [1]: http://jasonrudolph.com/blog/2009/02/25/git-tip-how-to-merge-specific-files-from-another-branch/ -- Darren Cook, Software Researcher/Developer http://dcook.org/work/ (About me and my work) http://dcook.org/blogs.html (My blogs and articles)
- References:
- [tlug] Git: bring in a file from another branch
- From: Darren Cook
Home | Main Index | Thread Index
- Prev by Date: [tlug] git: push from behind the firewall
- Next by Date: Re: [tlug] Git: bring in a file from another branch
- Previous by thread: [tlug] Git: bring in a file from another branch
- Next by thread: Re: [tlug] Git: bring in a file from another branch
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links