[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GIT version
[Thread Prev] | [Thread Next]
- Subject: Re: GIT version
- From: Christof Thalhofer <chrisml@xxxxxxxxxxx>
- Date: Sat, 8 Feb 2025 12:16:29 +0100
- To: user@xxxxxxxxxxxxxxxxxxxxxx
Am 08.02.25 um 11:09 schrieb BB:
On 8/2/25 7:54 pm, Christof Thalhofer wrote:The 'staging area' with its possibility to select and collect a couple of changes to compose a commit. The 'stash' that can be used to set aside all changes to forget them or reapply them later. I did not test if it can be used to create branches and if it would be possible to cherry-pick from another branch into the current one.Yes, I start to see. That is one of the reasons I use external tools (like qgit) where I can do "partial" commits of the current working set (or staged changes as you call them).
The stage is there to collect specific changes and commit them afterwards. Staging is done by 'git add'.
https://github.com/git-guides/git-add
As for the cherry picking copy issue, I dont think that is possible (with ease). A ----> B -------------> \ pick some of \ B and merge it back into A A -----> A' ----------------> There may be a way to do this with git itself but frankly it looks like a recipe for madness 😕
Cherry picking is very easy.Assume you are in a feature branch (featurex) which was created from master. And then you change something that should also be in master. But not the rest of your work in featurex.
Just commit this special change: 'git add filewithmyspecialchange' 'git comit -m "my special change" Remember the hash of that commit. Switch to master: 'git checkout master' Then do 'git cherry-pick $hash' Now this commit is also part of master. Switch back to featurex: 'git checkout featurex' And you're done. Thanks to finely granulated commits. It was madness in SVN. Alles Gute Christof Thalhofer -- Dies ist keine Signatur
GIT version | Philippe Valarcher <philippe.valarcher@xxxxxxx> |
Re: GIT version | Bruce Steers <bsteers4@xxxxxxxxx> |
Re: GIT version | Philippe Valarcher <philippe.valarcher@xxxxxxx> |
Re: GIT version | gbWilly <gbWilly@xxxxxxxxxxxxxx> |
Re: GIT version | Philippe Valarcher <philippe.valarcher@xxxxxxx> |
Re: GIT version | Bruce Steers <bsteers4@xxxxxxxxx> |
Re: GIT version | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |
Re: GIT version | Christof Thalhofer <chrisml@xxxxxxxxxxx> |
Re: GIT version | Christof Thalhofer <chrisml@xxxxxxxxxxx> |
Re: GIT version | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |
Re: GIT version | Christof Thalhofer <chrisml@xxxxxxxxxxx> |
Re: GIT version | BB <adamnt42@xxxxxxxxx> |
Re: GIT version | Christof Thalhofer <chrisml@xxxxxxxxxxx> |
Re: GIT version | BB <adamnt42@xxxxxxxxx> |