I am trying to setup repository with gitflow support. I did following things:
On remote server:
root@czdc-repository tester]$ git init --bare
Initialized empty Git repository in /repo/git/INFRA_MGMT/tester/
[ SCREEN root@czdc-repository tester]$ ll
total 64
drwxrwx---+ 2 root root 4096 Oct 8 13:33 branches
-rw-rw----+ 1 root root 66 Oct 8 13:33 config
-rw-rw----+ 1 root root 73 Oct 8 13:33 description
-rw-rw----+ 1 root root 23 Oct 8 13:33 HEAD
drwxrwx---+ 2 root root 4096 Oct 8 13:33 hooks
drwxrwx---+ 2 root root 4096 Oct 8 13:33 info
drwxrwx---+ 4 root root 4096 Oct 8 13:33 objects
drwxrwx---+ 4 root root 4096 Oct 8 13:33 refs
###########################################################################
On localhost I've cloned repo and added readme file
(tester)veverka@czlx-veverka-mini [01:36:24] [~/git/tester] [master]
-> % git push
No refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as 'master'.
fatal: The remote end hung up unexpectedly
error: failed to push some refs to 'repository.example.cz:/repo/git/INFRA_MGMT/tester'
(tester)veverka@czlx-veverka-mini [01:36:27] [~/git/tester] [master]
-> % git push origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 233 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To repository.example.cz:/repo/git/INFRA_MGMT/tester
* [new branch] master -> master
==============================================================
Initialized git-flow
-> % git flow init -d
Using default branch names.
Which branch should be used for bringing forth production releases?
- master
Branch name for production releases: [master]
Branch name for "next release" development: [develop]
How to name your supporting branch prefixes?
Feature branches? [feature/]
Release branches? [release/]
Hotfix branches? [hotfix/]
Support branches? [support/]
Version tag prefix? []
(tester)veverka@czlx-veverka-mini [01:38:48] [~/git/tester] [develop]
-> % echo FLOW >> README
(tester)veverka@czlx-veverka-mini [01:39:02] [~/git/tester] [develop *]
-> % git commit -a -m "edited README file"
[develop 4aefcd6] edited README file
1 file changed, 1 insertion(+)
==============================================================
Added new feature
(tester)veverka@czlx-veverka-mini [01:39:18] [~/git/tester] [develop]
-> % git flow feature start testingGitFlow
Switched to a new branch 'feature/testingGitFlow'
Summary of actions:
- A new branch 'feature/testingGitFlow' was created, based on 'develop'
- You are now on branch 'feature/testingGitFlow'
Now, start committing on your feature. When done, use:
git flow feature finish testingGitFlow
==============================================================
Published feature to remote server
(tester)veverka@czlx-veverka-mini [01:39:47] [~/git/tester] [feature/testingGitFlow]
-> % git flow feature publish testingGitFlow
Counting objects: 5, done.
Writing objects: 100% (3/3), 265 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To repository.example.cz:/repo/git/INFRA_MGMT/tester
* [new branch] feature/testingGitFlow -> feature/testingGitFlow
Already on 'feature/testingGitFlow'
Summary of actions:
- A new remote branch 'feature/testingGitFlow' was created
- The local branch 'feature/testingGitFlow' was configured to track the remote branch
- You are now on branch 'feature/testingGitFlow'
==============================================================
After I've cloned repo from remote repository to another folder on localhost and can't see any gitflow branches
veverka@czlx-veverka-mini [01:43:18] [~/tmp] [develop]
-> % git clone repository.example.cz:/repo/git/INFRA_MGMT/tester
Cloning into 'tester'...
remote: Counting objects: 6, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 6 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (6/6), done.
veverka@czlx-veverka-mini [01:43:22] [~/tmp] [develop]
-> % cd tester
veverka@czlx-veverka-mini [01:43:25] [~/tmp/tester] [master]
-> % ls
README
veverka@czlx-veverka-mini [01:43:26] [~/tmp/tester] [master]
-> % git branch
* master
veverka@czlx-veverka-mini [01:43:29] [~/tmp/tester] [master]
-> % git flow feature pull testingGitFlow
fatal: Not a gitflow-enabled repo yet. Please run "git flow init" first.
==============================================================
I've also tried to use git push --all and git pull --all, but it didn't help
Local directory where gitflow was initialized:
(tester)veverka@czlx-veverka-mini [01:40:51] [~/git/tester] [feature/testingGitFlow]
-> % git push --all
Total 0 (delta 0), reused 0 (delta 0)
To repository.example.cz:/repo/git/INFRA_MGMT/tester
* [new branch] develop -> develop
Local cloned directory:
-> % git pull --all
Fetching origin
From repository.example.cz:/repo/git/INFRA_MGMT/tester
* [new branch] develop -> origin/develop
Already up-to-date.
veverka@czlx-veverka-mini [01:50:15] [~/tmp/tester] [master]
-> % git flow feature track testingGitFlow
fatal: Not a gitflow-enabled repo yet. Please run "git flow init" first.
==============================================================
Can anyone help what should I do to push gitflow to remote server so that if repo is cloned again, gitflow will bi initialized and ready to use?