No subject


Wed Apr 17 13:17:15 BST 2019


[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