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

Gilles Caulier caulier.gilles at gmail.com
Mon Feb 7 09:15:32 GMT 2011


Incredible :

I just remove some empty line to end of NEWS file from digiKam core,
just to test to commit...

i use this alias : git config --global alias.ci "commit -a"

Now i want to record my change to KDE repository:

[gilles at localhost core]$ git ci

[2.0 10b7c43] update
 Committer: Gilles Caulier <gilles at localhost.localdomain>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:

    git config --global user.name "Your Name"
    git config --global user.email you at example.com

If the identity used for this commit is wrong, you can fix it with:

    git commit --amend --author='Your Name <you at example.com>'

 1 files changed, 0 insertions(+), 2 deletions(-)
[gilles at localhost core]$ git push
Warning: Permanently added 'git.kde.org,195.135.221.71' (RSA) to the
list of known hosts.
Everything up-to-date
[gilles at localhost core]$ git status
# On branch 2.0
# Your branch is ahead of 'origin/development/2.0' by 1 commit.
#
nothing to commit (working directory clean)

The question is : file is really committed ? the message is not clear
for me. If i take a look into Git web interface, it's not committed :

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/changes/NEWS

What's wrong here ?

Gilles

2011/2/7 Gilles Caulier <caulier.gilles at gmail.com>:
> This doen't work really.
>
> From digikam core, i removed AUTHOR file as well (rm -f AUTHOR)
>
> [gilles at localhost core]$ git status
> # On branch 2.0
> # Changed but not updated:
> #   (use "git add/rm <file>..." to update what will be committed)
> #   (use "git checkout -- <file>..." to discard changes in working directory)
> #
> #       deleted:    AUTHORS
> #
> no changes added to commit (use "git add" and/or "git commit -a")
> [gilles at localhost core]$
>
> and :
>
> [gilles at localhost core]$ git checkout
> D       AUTHORS
>
> but AUTHOR file still not there. git doen't work as subversion.... why ?
>
> As you said, you must be more explicit with git :
>
> [gilles at localhost core]$ git checkout AUTHORS
> [gilles at localhost core]$ ls
> AUTHORS    CMakeLists.txt          COPYING.DOC  databaseserver/
> digikam.lsm.cmake  imageplugins/  libs/         NEWS      README.FACE
> themedesigner/  TODO.FACE       utilities/
> ChangeLog  config-digikam.h.cmake  COPYING.LIB  DESIGN
> Doxyfile.cmake     INSTALL        Mainpage.dox  project/  showfoto/
> tips            TODO.MYSQLPORT
> cmake/     COPYING                 data/        digikam/
> HACKING            kioslave/      Messages.sh*  README    tests/
> TODO            TODO.QTSCRIPT
> [gilles at localhost core]$
>
> In this case, file is restored... but it's not user friendly...
> yes, i'm from old school, but why it's always complex for simple task ?
>
> And also, why if i ask to update local copy with remote repository, it
> refuse to restore the missing file, as subversion do ? I use alias set
> by git config --global alias.up "pull --rebase"
>
> This way to work with this SCM is not logic for me, so far...
>
> Gilles
>
> 2011/2/7 Gert Kello <gert.kello at gmail.com>:
>>> Just to see, remove a versionned file in local, and try to restore it
>>> from remote repository. Good luck...
>>
>> git checkout <filename>
>> or
>> git checkout -- <filename>
>>
>> I thought they are should behave differently, but at the moment I'm
>> not able to find the difference
>>
>> I'm kind of newbie with git also, and I know it is frustrating if You
>> can't figure out how to perform a simple svn operation with git. Now,
>> after a month or so, I start to think that git might be a nice system
>> actually.
>>
>> Gert
>> _______________________________________________
>> 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