[Digikam-devel] Re: how to use git as subversion

Gilles Caulier caulier.gilles at gmail.com
Sun Feb 6 22:21:38 GMT 2011


Marcel,

Just to see, remove a versionned file in local, and try to restore it
from remote repository. Good luck...

Gilles

2011/2/6 Gilles Caulier <caulier.gilles at gmail.com>:
> Marcel,
>
> It's understadable :
>
> [gilles at localhost core]$ git up
> AUTHORS: needs update
> libs/threads/dynamicthread.cpp: needs update
> libs/threads/dynamicthread.h: needs update
> libs/threads/threadmanager.cpp: needs update
> libs/threads/threadmanager.h: needs update
> libs/threads/workerobject.cpp: needs update
> libs/threads/workerobject.h: needs update
> refusing to pull with rebase: your working tree is not up-to-date
>
> git up is this alias
>
> git config --global alias.up "pull --rebase"
>
> i removed these file by hand, just to check how to restore it as well
> using remote repository.
>
> Result : i cannot => i remove all local clone, and re-checkout all from sctrach.
>
> I'm like handicaped with git to just perform simple task.
>
> I H.... this versioning tool. Now understand why Google code
> repository use Mercural ...
>
> I stop for now. I'm tired to waste time for today...
>
> Gilles
> 2011/2/6 Marcel Wiesweg <marcel.wiesweg at gmx.de>:
>>
>>>
>>> I'm really lost with git. It's complex to understand.
>>
>> :-)
>>
>> This tutorial gives 1:1 translations for SVN commands:
>> http://git.or.cz/course/svn.html
>>
>> As you already found out, git is not svn.
>> With git, your local clone is complete. With "git commit -a" you commit to
>> your local repository. As a second step, you push your changes to the remote
>> repository. You can collect commits, even commit offline, before pushing.
>>
>> The equivalent to "svn up" is "git pull". Not quite - the equivalent is "git
>> pull --rebase". The default, non-rebase will instead do a merge of your local
>> commits. Now if you have understood what I am talking about, you know enough
>> about git!
>> If not, you'll do in a month. Until then, I recommend to
>> git config --global alias.up "pull --rebase"
>> and then just type "git up" from now on. It's better for the occasional local
>> commit.
>>
>>> I don't want to manage branch in local and all complex situations. By
>>> experience, it's dangerous...
>>
>> With git, branches are just so much easier. But I dont want to encourage
>> private branches, development should be in the open after all.
>>
>>>
>>> Typically, i would to continue to work with git as subversion.
>>>
>>> repository is cloned. No problem.
>>>
>>> now, i change a change, and i want to "commit" my changes in KDE
>>> repository as like "svn ci". I perform "git commit"... git ask
>>> comment. fine. In comment i set CCBUGS in comment but nothing append
>>> in bugzilla. So i'm not sure that changes are commited.
>>
>> You need to "git push"... Commit is local so far.
>> Start up "gitk". You'll see that your local branch, "2.0", contains the
>> commit, while the remote branch does not yet.
>>
>>>
>>> To be sure, i delete my changed files (moves in another place in fact)
>>> and i want to perform "svn up" as well. I try "git pull", but git said
>>> that there is nothing to do. All is already updated...
>>>
>>> ARGGGGG... file are deleted !
>>>
>>> "git diff" said that files have been removed... but i'm not able to restore
>>> it.
>>
>> To undo local changes, use "git checkout", usually "git  checkout HEAD <some
>> paths>".
>> To reset local (unpushed) commits, use "git reset". There are some flavors: --
>> hard, --mixed or --soft. Never use this with pushed commits though...
>> Side note: To amend another change to a local commit, use "git commit --
>> amend". You cannot amend an already pushed commit.
>>
>>>
>>> I'm lost. I thinking that git is not perfect for me, or i'm not
>>> adapted to git (:=)))...
>>
>> You are not adapted. And nothing is perfect ;-)
>> _______________________________________________
>> Digikam-devel mailing list
>> Digikam-devel at kde.org
>> https://mail.kde.org/mailman/listinfo/digikam-devel
>>
>



More information about the Digikam-devel mailing list