how to use git as subversion

classic Classic list List threaded Threaded
47 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Re: how to use git as subversion

Gilles Caulier-4
Marcel,

Another question is how to concatenate git commands to one using git
alias. I would perform

#git commit -a -v ; git push

...at the same time...

I can create a shell alias, sure, but i would to know if it's possible
to do it directly with git.

Gilles

2011/2/8 Gilles Caulier <[hidden email]>:

> Marcel,
>
> Problem is "git up" alias to "git pull --rebase -v". this is my git
> configuration from my home dir :
>
> [gilles@localhost ~]$ pwd
> /home/gilles
> [gilles@localhost ~]$ cat .gitconfig
> [url "git://anongit.kde.org/"]
>        insteadOf = kde:
>
> [url "[hidden email]:"]
>        pushInsteadOf = kde:
>
> [url "ssh://[hidden email]/"]
>        pushinsteadof = kde://
>
> [alias]
>        up = pull --rebase -v
>        ci = commit -a -v
> [core]
>        editor = mcedit
> [user]
>        name = Gilles Caulier
>        email = [hidden email]
> [push]
>        default = tracking
>
> Now if i try to use it from lead git dir, it work :
>
> [gilles@localhost digikam-sc]$ pwd
> /mnt/data/Devel/GIT/digikam-sc
>
> [gilles@localhost digikam-sc]$ ls -al
> total 352
> drwxr-xr-x  8 gilles gilles   648 2011-02-07 14:48 ./
> drwxr-xr-x  5 gilles gilles   128 2011-02-07 12:12 ../
> -rwxr-xr-x  1 gilles gilles   349 2010-12-06 13:27 bootstrap*
> -rw-r--r--  1 gilles gilles 90926 2011-02-07 14:21 CMakeCache.txt
> drwxr-xr-x  6 gilles gilles   760 2011-02-07 14:50 CMakeFiles/
> -rw-r--r--  1 gilles gilles  1867 2011-02-07 11:37 cmake_install.cmake
> -rw-r--r--  1 gilles gilles  1764 2011-02-07 11:19 CMakeLists.txt
> drwxr-xr-x  2 gilles gilles    88 2011-02-07 11:37 CMakeTmp/
> -rw-r--r--  1 gilles gilles   892 2011-02-07 11:37 cmake_uninstall.cmake
> drwxr-xr-x 16 gilles gilles  1296 2011-02-07 14:48 core/
> -rwxr-xr-x  1 gilles gilles   300 2011-02-07 11:19 download-repos*
> -rw-rw-rw-  1 gilles gilles   181 2011-02-07 14:48 EnabledFeatures.txt
> drwxr-xr-x  6 gilles gilles   256 2011-02-07 14:48 extra/
> drwxr-xr-x  8 gilles gilles   392 2011-02-08 09:53 .git/
> -rw-r--r--  1 gilles gilles    53 2011-02-07 11:19 .gitignore
> -rwxr-xr-x  1 gilles gilles 73867 2011-02-07 11:19 gits*
> -rw-r--r--  1 gilles gilles   131 2011-02-07 11:19 .gitslave
> -rw-rw-rw-  1 root   root   57710 2011-02-07 14:28
> install_manifest.txt
> drwxr-xr-x  2 gilles gilles  2472 2011-02-07 14:50 lib/
> -rw-rw-r--  1 gilles gilles 79043 2011-02-07 14:48 Makefile
> -rw-r--r--  1 gilles gilles    77 2011-02-07 11:19 NEWS
> -rw-r--r--  1 gilles gilles   879 2011-02-07 11:19 README
> [gilles@localhost digikam-sc]$
>
> [gilles@localhost digikam-sc]$ git up
> From git://anongit.kde.org/scratch/mwiesweg/digikam-sc
>  = [up to date]      master     -> origin/master
> Current branch master is up to date.
>
> But of course it do not update core and extra sub-dirs. Now i try to
> use it in "core" :
>
> [gilles@localhost core]$ pwd
> /mnt/data/Devel/GIT/digikam-sc/core
>
> [gilles@localhost core]$ git up
> fatal: The remote end hung up unexpectedly
>
> In "extra" all is fine :
>
> [gilles@localhost extra]$ pwd
> /mnt/data/Devel/GIT/digikam-sc/extra
> [gilles@localhost extra]$ ls -al
> total 19
> drwxr-xr-x  6 gilles gilles  256 2011-02-07 14:48 ./
> drwxr-xr-x  8 gilles gilles  648 2011-02-07 14:48 ../
> drwxr-xr-x  2 gilles gilles  128 2011-02-07 14:48 CMakeFiles/
> -rw-r--r--  1 gilles gilles 1528 2011-02-07 11:37 cmake_install.cmake
> -rw-r--r--  1 gilles gilles 1041 2011-02-07 11:19 CMakeLists.txt
> drwxr-xr-x 36 gilles gilles 1632 2011-02-07 14:48 kipi-plugins/
> drwxr-xr-x  8 gilles gilles  600 2011-02-07 14:48 libkface/
> drwxr-xr-x 10 gilles gilles  632 2011-02-07 14:48 libkmap/
> -rw-r--r--  1 gilles gilles 5602 2011-02-07 11:37 Makefile
> [gilles@localhost extra]$ git up
> From git://anongit.kde.org/scratch/mwiesweg/digikam-sc
>  = [up to date]      master     -> origin/master
> Current branch master is up to date.
>
> in "kipi-plugins", it doesn't work :
>
> [gilles@localhost kipi-plugins]$ pwd
> /mnt/data/Devel/GIT/digikam-sc/extra/kipi-plugins
> [gilles@localhost kipi-plugins]$ ls -al
> total 1170
> drwxr-xr-x 36 gilles gilles    1632 2011-02-07 14:48 ./
> drwxr-xr-x  6 gilles gilles     256 2011-02-07 14:48 ../
> drwxr-xr-x  3 gilles gilles    1008 2011-02-07 14:48 acquireimages/
> drwxr-xr-x  4 gilles gilles    2720 2011-02-07 14:48 advancedslideshow/
> -rw-r--r--  1 gilles gilles    3588 2011-02-07 11:20 AUTHORS
> drwxr-xr-x  4 gilles gilles    3576 2011-02-07 14:48 batchprocessimages/
> drwxr-xr-x  3 gilles gilles    1536 2011-02-07 14:48 calendar/
> -rw-r--r--  1 gilles gilles 1029272 2011-02-07 11:20 ChangeLog
> drwxr-xr-x  4 gilles gilles     104 2011-02-07 11:20 cmake/
> drwxr-xr-x  4 gilles gilles     208 2011-02-07 14:48 CMakeFiles/
> -rw-r--r--  1 gilles gilles    4059 2011-02-07 11:37 cmake_install.cmake
> -rw-r--r--  1 gilles gilles   15433 2011-02-07 11:20 CMakeLists.txt
> drwxr-xr-x  4 gilles gilles     248 2011-02-07 14:48 common/
> -rw-r--r--  1 gilles gilles   18019 2011-02-07 11:20 COPYING
> -rw-r--r--  1 gilles gilles    5605 2011-02-07 11:20 COPYING-ADOBE
> -rw-r--r--  1 gilles gilles     923 2011-02-07 11:37 CTestTestfile.cmake
> drwxr-xr-x  4 gilles gilles    1392 2011-02-07 14:48 debianscreenshots/
> drwxr-xr-x  8 gilles gilles     400 2011-02-07 14:48 dngconverter/
> drwxr-xr-x  8 gilles gilles    1280 2011-02-07 14:48 expoblending/
> drwxr-xr-x  4 gilles gilles    1128 2011-02-07 14:48 facebook/
> drwxr-xr-x  4 gilles gilles    1280 2011-02-07 14:48 flashexport/
> drwxr-xr-x  4 gilles gilles    1608 2011-02-07 14:48 flickrexport/
> drwxr-xr-x  4 gilles gilles    1296 2011-02-07 14:48 galleryexport/
> drwxr-xr-x  8 gilles gilles     328 2011-02-07 11:20 .git/
> drwxr-xr-x  8 gilles gilles    3560 2011-02-07 14:48 gpssync/
> -rw-r--r--  1 gilles gilles   11155 2011-02-07 11:20 HACKING
> drwxr-xr-x  4 gilles gilles    2096 2011-02-07 14:48 htmlexport/
> drwxr-xr-x  5 gilles gilles     896 2011-02-07 14:48 imageviewer/
> -rw-r--r--  1 gilles gilles      87 2011-02-07 11:20 INSTALL
> drwxr-xr-x  3 gilles gilles     960 2011-02-07 14:48 ipodexport/
> drwxr-xr-x  4 gilles gilles    1440 2011-02-07 14:48 jpeglossless/
> drwxr-xr-x  3 gilles gilles    1064 2011-02-07 14:48 kioexportimport/
> -rw-r--r--  1 gilles gilles     936 2011-02-07 11:37 kipi-plugins.lsm
> -rw-r--r--  1 gilles gilles     971 2011-02-07 11:20 kipi-plugins.lsm.cmake
> drwxr-xr-x  3 gilles gilles     512 2011-02-07 14:48 kopete/
> -rw-r--r--  1 gilles gilles     171 2011-02-07 11:20 .krazy
> -rw-r--r--  1 gilles gilles    7046 2011-02-07 11:37 Makefile
> -rw-r--r--  1 gilles gilles     185 2011-02-07 11:20 Messages.sh
> drwxr-xr-x  9 gilles gilles    1904 2011-02-07 14:48 metadataedit/
> -rw-r--r--  1 gilles gilles     761 2011-02-07 11:20 NEWS
> drwxr-xr-x  4 gilles gilles    1568 2011-02-07 14:48 picasawebexport/
> drwxr-xr-x  4 gilles gilles     976 2011-02-07 14:48 piwigoexport/
> drwxr-xr-x  4 gilles gilles    1936 2011-02-07 14:48 printimages/
> drwxr-xr-x  4 gilles gilles     960 2011-02-07 11:20 project/
> drwxr-xr-x  4 gilles gilles    1056 2011-02-07 14:48 rawconverter/
> -rw-r--r--  1 gilles gilles    8096 2011-02-07 11:20 README
> drwxr-xr-x  7 gilles gilles    1568 2011-02-07 14:48 removeredeyes/
> drwxr-xr-x  3 gilles gilles    1096 2011-02-07 14:48 sendimages/
> drwxr-xr-x  4 gilles gilles    1040 2011-02-07 14:48 shwup/
> drwxr-xr-x  4 gilles gilles    1008 2011-02-07 14:48 smug/
> -rw-r--r--  1 gilles gilles     641 2011-02-07 11:37 svnscript.cmake
> drwxr-xr-x  4 gilles gilles     816 2011-02-07 14:48 timeadjust/
> -rw-r--r--  1 gilles gilles    4755 2011-02-07 11:20 tips
> -rw-r--r--  1 gilles gilles    1817 2011-02-07 11:20 TODO
> drwxr-xr-x  2 gilles gilles     264 2011-02-07 11:20 wallpaper/
> [gilles@localhost kipi-plugins]$ git up
> fatal: The remote end hung up unexpectedly
>
> Same problem in libkface :
>
> [gilles@localhost libkface]$ pwd
> /mnt/data/Devel/GIT/digikam-sc/extra/libkface
> [gilles@localhost libkface]$ ls -al
> total 74
> drwxr-xr-x 8 gilles gilles   600 2011-02-07 14:48 ./
> drwxr-xr-x 6 gilles gilles   256 2011-02-07 14:48 ../
> -rw-r--r-- 1 gilles gilles   226 2011-02-07 11:20 AUTHORS
> drwxr-xr-x 4 gilles gilles   104 2011-02-07 11:20 cmake/
> drwxr-xr-x 3 gilles gilles   160 2011-02-07 14:48 CMakeFiles/
> -rw-r--r-- 1 gilles gilles  2104 2011-02-07 11:37 cmake_install.cmake
> -rw-r--r-- 1 gilles gilles  6255 2011-02-07 11:20 CMakeLists.txt
> -rw-r--r-- 1 gilles gilles 18019 2011-02-07 11:20 COPYING
> -rw-r--r-- 1 gilles gilles   335 2011-02-07 11:37 CTestTestfile.cmake
> drwxr-xr-x 8 gilles gilles   328 2011-02-07 11:20 .git/
> drwxr-xr-x 2 gilles gilles   520 2011-02-07 14:48 libface/
> drwxr-xr-x 3 gilles gilles   832 2011-02-07 14:48 libkface/
> -rw-r--r-- 1 gilles gilles   657 2011-02-07 11:37 libkface.lsm
> -rw-r--r-- 1 gilles gilles   679 2011-02-07 11:20 libkface.lsm.cmake
> -rw-r--r-- 1 gilles gilles   333 2011-02-07 11:37 libkface.pc
> -rw-r--r-- 1 gilles gilles   424 2011-02-07 11:20 libkface.pc.cmake
> -rw-r--r-- 1 gilles gilles  6241 2011-02-07 11:37 Makefile
> -rw-r--r-- 1 gilles gilles   100 2011-02-07 11:20 NEWS
> -rw-r--r-- 1 gilles gilles  2769 2011-02-07 11:20 README
> drwxr-xr-x 5 gilles gilles   744 2011-02-07 14:48 test/
> -rw-r--r-- 1 gilles gilles     0 2011-02-07 11:20 TODO
> [gilles@localhost libkface]$ git up
> fatal: The remote end hung up unexpectedly
>
> ...and libkmap :
>
> [gilles@localhost libkmap]$ pwd
> /mnt/data/Devel/GIT/digikam-sc/extra/libkmap
> [gilles@localhost libkmap]$ ls -al
> total 62
> drwxr-xr-x 10 gilles gilles  632 2011-02-07 14:48 ./
> drwxr-xr-x  6 gilles gilles  256 2011-02-07 14:48 ../
> -rw-r--r--  1 gilles gilles  177 2011-02-07 11:20 AUTHORS
> drwxr-xr-x  3 gilles gilles  496 2011-02-07 14:48 calibrator/
> drwxr-xr-x  3 gilles gilles   72 2011-02-07 11:20 cmake/
> drwxr-xr-x  3 gilles gilles  160 2011-02-07 14:48 CMakeFiles/
> -rw-r--r--  1 gilles gilles 2351 2011-02-07 11:37 cmake_install.cmake
> -rw-r--r--  1 gilles gilles 4128 2011-02-07 11:20 CMakeLists.txt
> -rw-r--r--  1 gilles gilles  380 2011-02-07 11:37 CTestTestfile.cmake
> drwxr-xr-x  3 gilles gilles 2000 2011-02-07 14:48 data/
> drwxr-xr-x  3 gilles gilles  784 2011-02-07 14:48 demo/
> drwxr-xr-x  8 gilles gilles  328 2011-02-07 11:20 .git/
> drwxr-xr-x  3 gilles gilles 2496 2011-02-07 14:48 libkmap/
> -rw-r--r--  1 gilles gilles  594 2011-02-07 11:37 libkmap.lsm
> -rw-r--r--  1 gilles gilles  615 2011-02-07 11:20 libkmap.lsm.cmake
> -rw-r--r--  1 gilles gilles  273 2011-02-07 11:37 libkmap.pc
> -rw-r--r--  1 gilles gilles  363 2011-02-07 11:20 libkmap.pc.cmake
> -rw-r--r--  1 gilles gilles 6230 2011-02-07 11:37 Makefile
> -rwxr-xr-x  1 gilles gilles   57 2011-02-07 11:20 Messages.sh*
> -rw-r--r--  1 gilles gilles 2874 2011-02-07 11:20 README
> drwxr-xr-x  3 gilles gilles  528 2011-02-07 14:48 test/
> -rw-r--r--  1 gilles gilles 3264 2011-02-07 11:20 TODO
> [gilles@localhost libkmap]$ git up
> fatal: The remote end hung up unexpectedly
>
> Now, see below my config files from local repository sub-dir :
>
> [gilles@localhost .git]$ pwd
> /mnt/data/Devel/GIT/digikam-sc/.git
> [gilles@localhost .git]$ cat config
> [core]
>        repositoryformatversion = 0
>        filemode = true
>        bare = false
>        logallrefupdates = true
> [remote "origin"]
>        fetch = +refs/heads/*:refs/remotes/origin/*
>        url = kde:scratch/mwiesweg/digikam-sc
> [branch "master"]
>        remote = origin
>        merge = refs/heads/master
>
> //-------------------------------------------------------------
>
> [gilles@localhost .git]$ pwd
> /mnt/data/Devel/GIT/digikam-sc/core/.git
> [gilles@localhost .git]$ cat config
> [core]
>        repositoryformatversion = 0
>        filemode = true
>        bare = false
>        logallrefupdates = true
> [remote "origin"]
>        fetch = +refs/heads/*:refs/remotes/origin/*
>        url = kde://digikam
> [branch "master"]
>        remote = origin
>        merge = refs/heads/master
> [branch "2.0"]
>        remote = origin
>        merge = refs/heads/development/2.0
>
> //-------------------------------------------------------------
>
> [gilles@localhost .git]$ pwd
> /mnt/data/Devel/GIT/digikam-sc/extra/kipi-plugins/.git
> [gilles@localhost .git]$ cat config
> [core]
>        repositoryformatversion = 0
>        filemode = true
>        bare = false
>        logallrefupdates = true
> [remote "origin"]
>        fetch = +refs/heads/*:refs/remotes/origin/*
>        url = kde://kipi-plugins
> [branch "master"]
>        remote = origin
>        merge = refs/heads/master
> [branch "2.0"]
>        remote = origin
>        merge = refs/heads/development/2.0
>
> //-------------------------------------------------------------
>
> [gilles@localhost .git]$ pwd
> /mnt/data/Devel/GIT/digikam-sc/extra/libkface/.git
> [gilles@localhost .git]$ cat config
> [core]
>        repositoryformatversion = 0
>        filemode = true
>        bare = false
>        logallrefupdates = true
> [remote "origin"]
>        fetch = +refs/heads/*:refs/remotes/origin/*
>        url = kde://libkface
> [branch "master"]
>        remote = origin
>        merge = refs/heads/master
>
> //-------------------------------------------------------------
>
> [gilles@localhost .git]$ pwd
> /mnt/data/Devel/GIT/digikam-sc/extra/libkmap/.git
> [gilles@localhost .git]$ cat config
> [core]
>        repositoryformatversion = 0
>        filemode = true
>        bare = false
>        logallrefupdates = true
> [remote "origin"]
>        fetch = +refs/heads/*:refs/remotes/origin/*
>        url = kde://libkmap
> [branch "master"]
>        remote = origin
>        merge = refs/heads/master
>
> Gilles
>
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: how to use git as subversion

Marcel Wiesweg
In reply to this post by Bugzilla from gert.kello@gmail.com

> > [url "[hidden email]:"]
> >        pushInsteadOf = kde:
> >
> > [url "ssh://[hidden email]/"]
> >        pushinsteadof = kde://
>
> I believe this "insteadof=kde:" causes problems

This is probably indeed your problem.
Ensure that your ~/.gitconfig has this:
[url "git://anongit.kde.org/"]
     insteadOf = kde:
     insteadof = kde://
[url "ssh://[hidden email]/"]
     pushInsteadOf = kde:
     pushinsteadof = kde://

then either way should work
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: how to use git as subversion

Marcel Wiesweg
In reply to this post by Gilles Caulier-4

> Another question is how to concatenate git commands to one using git
> alias. I would perform
>
> #git commit -a -v ; git push
>
> ...at the same time...
>
> I can create a shell alias, sure, but i would to know if it's possible
> to do it directly with git.

I dont know of a solution to do this with "git alias".
What you can do, per-repository, is to add a "commit-hook": Whenever you
commit, a script is executed, and this script can be "git push":
echo "git push" > .git/hooks/post-commit
chmod 755 .git/hooks/post-commit

but then you take away a good deal of flexibility. So I would recommend a
shell function in your ~/.bashrc.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: how to use git as subversion

Gilles Caulier-4
In reply to this post by Marcel Wiesweg
2011/2/8 Marcel Wiesweg <[hidden email]>:

>
>> > [url "[hidden email]:"]
>> >        pushInsteadOf = kde:
>> >
>> > [url "ssh://[hidden email]/"]
>> >        pushinsteadof = kde://
>>
>> I believe this "insteadof=kde:" causes problems
>
> This is probably indeed your problem.
> Ensure that your ~/.gitconfig has this:
> [url "git://anongit.kde.org/"]
>     insteadOf = kde:
>     insteadof = kde://
> [url "ssh://[hidden email]/"]
>     pushInsteadOf = kde:
>     pushinsteadof = kde://

These lines are copied as well from here !

http://community.kde.org/Sysadmin/GitFAQ#Let_Git_rewrite_URL_prefixes

So, if it's wrong... this must be fixed by KDE team...

>
> then either way should work

I changed it in my ~/.gitconfig and trying again :

[gilles@localhost core]$ pwd
/mnt/data/Devel/GIT/digikam-sc/core
[gilles@localhost core]$ git pull --rebase
fatal: The remote end hung up unexpectedly

I will try to remove all code in local, and checkout all from scratch
to see if it's better.

Gilles
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: how to use git as subversion

Gilles Caulier-4
Now all work fine :

//------------------------------------------------------------------------------
[gilles@localhost GIT]$ git clone kde://scratch/mwiesweg/digikam-sc
Initialized empty Git repository in /mnt/data/Devel/GIT/digikam-sc/.git/
remote: Counting objects: 46, done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 46 (delta 16), reused 35 (delta 11)
Receiving objects: 100% (46/46), 23.99 KiB, done.
Resolving deltas: 100% (16/16), done.

[gilles@localhost GIT]$
[gilles@localhost digikam-sc]$ ./download-repos
Initialized empty Git repository in /mnt/data/Devel/GIT/digikam-sc/core/.git/
remote: Counting objects: 185427, done.
remote: Compressing objects: 100% (30791/30791), done.
remote: Total 185427 (delta 154961), reused 184865 (delta 154439)
Receiving objects: 100% (185427/185427), 139.82 MiB | 10.09 MiB/s, done.
Resolving deltas: 100% (154961/154961), done.
Initialized empty Git repository in
/mnt/data/Devel/GIT/digikam-sc/extra/libkface/.git/
remote: Counting objects: 1712, done.
remote: Compressing objects: 100% (402/402), done.
remote: Total 1712 (delta 1285), reused 1712 (delta 1285)
Receiving objects: 100% (1712/1712), 1.38 MiB, done.
Resolving deltas: 100% (1285/1285), done.
Initialized empty Git repository in
/mnt/data/Devel/GIT/digikam-sc/extra/libkmap/.git/
remote: Counting objects: 2917, done.
remote: Compressing objects: 100% (585/585), done.
remote: Total 2917 (delta 2322), reused 2917 (delta 2322)
Receiving objects: 100% (2917/2917), 579.11 KiB, done.
Resolving deltas: 100% (2322/2322), done.
Initialized empty Git repository in
/mnt/data/Devel/GIT/digikam-sc/extra/kipi-plugins/.git/
remote: Counting objects: 48453, done.
remote: Compressing objects: 100% (8674/8674), done.
remote: Total 48453 (delta 39466), reused 48436 (delta 39458)
Receiving objects: 100% (48453/48453), 13.06 MiB | 5.11 MiB/s, done.
Resolving deltas: 100% (39466/39466), done.
Branch 2.0 set up to track remote branch development/2.0 from origin.
Switched to a new branch '2.0'
Branch 2.0 set up to track remote branch development/2.0 from origin.
Switched to a new branch '2.0'

[gilles@localhost core]$ git up
From git://anongit.kde.org/digikam
 = [up to date]      development/0.10 -> origin/development/0.10
 = [up to date]      development/0.8 -> origin/development/0.8
 = [up to date]      development/0.8.x -> origin/development/0.8.x
 = [up to date]      development/0.9.x -> origin/development/0.9.x
 = [up to date]      development/1.2 -> origin/development/1.2
 = [up to date]      development/1.3 -> origin/development/1.3
 = [up to date]      development/2.0 -> origin/development/2.0
 = [up to date]      kde3       -> origin/kde3
 = [up to date]      master     -> origin/master
Current branch 2.0 is up to date.

[gilles@localhost core]$ git ci

[2.0 8ddbf81] test
 1 files changed, 1 insertions(+), 0 deletions(-)

[gilles@localhost core]$ git push
Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 286 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: This commit is available for viewing at:
remote: http://commits.kde.org/digikam/8ddbf8198aea5a521136cdcfbaf45f2307fc8689
To [hidden email]:digikam
   01c8829..8ddbf81  2.0 -> development/2.0
//------------------------------------------------------------------------------

My git config is this one :

//------------------------------------------------------------------------------
[gilles@localhost GIT]$ cat ~/.gitconfig
[url "git://anongit.kde.org/"]
        insteadof = kde://
        insteadof = kde://

[url "[hidden email]:"]
        pushinsteadof = kde://

[url "ssh://[hidden email]/"]
        pushinsteadof = kde://
        pushinsteadof = kde://

[alias]
        up = pull --rebase -v
        ci = commit -a -v
[core]
        editor = mcedit

[user]
        name = Gilles Caulier
        email = [hidden email]

[push]
        default = tracking
//------------------------------------------------------------------------------

Gilles
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: how to use git as subversion

Bugzilla from andi.clemens@gmx.net
In reply to this post by Marcel Wiesweg
why so complicated?
bash does no the alias command :-)



Andi Clemens
-----------------
www.digikam.org

On Tuesday 08 February 2011 19:23:47 Marcel Wiesweg wrote:

> > Another question is how to concatenate git commands to one using git
> > alias. I would perform
> >
> > #git commit -a -v ; git push
> >
> > ...at the same time...
> >
> > I can create a shell alias, sure, but i would to know if it's possible
> > to do it directly with git.
>
> I dont know of a solution to do this with "git alias".
> What you can do, per-repository, is to add a "commit-hook": Whenever you
> commit, a script is executed, and this script can be "git push":
> echo "git push" > .git/hooks/post-commit
> chmod 755 .git/hooks/post-commit
>
> but then you take away a good deal of flexibility. So I would recommend a
> shell function in your ~/.bashrc.
> _______________________________________________
> Digikam-devel mailing list
> [hidden email]
> https://mail.kde.org/mailman/listinfo/digikam-devel
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: how to use git as subversion

Bugzilla from andi.clemens@gmx.net
I meant
"bash does know the alias command" ;-)

Andi Clemens
-----------------
www.digikam.org

On Thursday 10 February 2011 06:28:18 Andi Clemens wrote:

> why so complicated?
> bash does no the alias command :-)
>
>
>
> Andi Clemens
> -----------------
> www.digikam.org
>
> On Tuesday 08 February 2011 19:23:47 Marcel Wiesweg wrote:
> > > Another question is how to concatenate git commands to one using git
> > > alias. I would perform
> > >
> > > #git commit -a -v ; git push
> > >
> > > ...at the same time...
> > >
> > > I can create a shell alias, sure, but i would to know if it's possible
> > > to do it directly with git.
> >
> > I dont know of a solution to do this with "git alias".
> > What you can do, per-repository, is to add a "commit-hook": Whenever you
> > commit, a script is executed, and this script can be "git push":
> > echo "git push" > .git/hooks/post-commit
> > chmod 755 .git/hooks/post-commit
> >
> > but then you take away a good deal of flexibility. So I would recommend a
> > shell function in your ~/.bashrc.
> > _______________________________________________
> > Digikam-devel mailing list
> > [hidden email]
> > https://mail.kde.org/mailman/listinfo/digikam-devel
>
> _______________________________________________
> Digikam-devel mailing list
> [hidden email]
> https://mail.kde.org/mailman/listinfo/digikam-devel
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
123