[git-users] git workflow (testing branch, then rolling back to master branch)

2013-09-20 Thread Christian Koep
hello,
I'm currently trying to realise the following git workflow in our team:

*Our Infrastructure:*
We have a remote repository called dev. it contains puppet modules / 
puppet source code.
The source code gets frequently pulled into our puppet masters file system 
/modules/dev.

*Example workflow:*

   1. Developer 1 creates a new branch hotfix-module-xxx.
   2. Developer 1 pushes the branch to the remote repo.
   3. Developer 1 *pulls *the changes from that branch to the filesystem of 
   the puppet master server. (git pull origin hotfix.module-xxx).
   4. Developer 1 runs tests with the source code from the branch.
   5. *When the tests are complete, I would like to have some kind of 
   rollback. That the changes from the hotfix branch are reverted. (something 
   like git pull origin master) and the filesystem is at the state before the 
   pull.*
   6. If the tests are successful, Developer 1 can merge his hotifx branch 
   with the main branch and then push it out. After that he can pull the 
   changes to the file system of the puppet master server. 


The problem is, once i git pulled from the hotfix branch, these changes 
are in the file system. There is no going back. 
Even if i remove the branch from the remote repository and pull from it 
again, the changed files from the branch are still in the file system.


Is there any way to realize this?
*
*

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [git-users] git workflow (testing branch, then rolling back to master branch)

2013-09-20 Thread Gergely Polonkai
Hello,

how about this?

git fetch origin hotfix.module-xxx
git checkout -b hotfix.module-xxx origin/hotfix.module-xxx
(compile, test, whatever)
git checkout master

Maybe there's a shorthand for fetch  checkout -b. I'm not behind git
--help right now to check. It worked for me several times this way.

Cheers,
Gergely
On 20 Sep 2013 10:41, Christian Koep dert...@gmail.com wrote:

 hello,
 I'm currently trying to realise the following git workflow in our team:

 *Our Infrastructure:*
 We have a remote repository called dev. it contains puppet modules /
 puppet source code.
 The source code gets frequently pulled into our puppet masters file system
 /modules/dev.

 *Example workflow:*

1. Developer 1 creates a new branch hotfix-module-xxx.
2. Developer 1 pushes the branch to the remote repo.
3. Developer 1 *pulls *the changes from that branch to the filesystem
of the puppet master server. (git pull origin hotfix.module-xxx).
4. Developer 1 runs tests with the source code from the branch.
5. *When the tests are complete, I would like to have some kind of
rollback. That the changes from the hotfix branch are reverted. (something
like git pull origin master) and the filesystem is at the state before the
pull.*
6. If the tests are successful, Developer 1 can merge his hotifx
branch with the main branch and then push it out. After that he can pull
the changes to the file system of the puppet master server.


 The problem is, once i git pulled from the hotfix branch, these changes
 are in the file system. There is no going back.
 Even if i remove the branch from the remote repository and pull from it
 again, the changed files from the branch are still in the file system.


 Is there any way to realize this?
 *
 *

 --
 You received this message because you are subscribed to the Google Groups
 Git for human beings group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to git-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [git-users] git workflow (testing branch, then rolling back to master branch)

2013-09-20 Thread Christian Koep
Hey,

this helped a lot! thank you very much

On Friday, September 20, 2013 10:48:35 AM UTC+2, Gergely Polonkai wrote:

 Hello,

 how about this?

 git fetch origin hotfix.module-xxx
 git checkout -b hotfix.module-xxx origin/hotfix.module-xxx
 (compile, test, whatever)
 git checkout master

 Maybe there's a shorthand for fetch  checkout -b. I'm not behind git 
 --help right now to check. It worked for me several times this way.

 Cheers,
 Gergely
 On 20 Sep 2013 10:41, Christian Koep der...@gmail.com javascript: 
 wrote:

 hello,
 I'm currently trying to realise the following git workflow in our team:

 *Our Infrastructure:*
 We have a remote repository called dev. it contains puppet modules / 
 puppet source code.
 The source code gets frequently pulled into our puppet masters file 
 system /modules/dev.

 *Example workflow:*

1. Developer 1 creates a new branch hotfix-module-xxx. 
2. Developer 1 pushes the branch to the remote repo.
3. Developer 1 *pulls *the changes from that branch to the filesystem 
of the puppet master server. (git pull origin hotfix.module-xxx). 
4. Developer 1 runs tests with the source code from the branch.
5. *When the tests are complete, I would like to have some kind of 
rollback. That the changes from the hotfix branch are reverted. 
 (something 
like git pull origin master) and the filesystem is at the state before 
 the 
pull.* 
6. If the tests are successful, Developer 1 can merge his hotifx 
branch with the main branch and then push it out. After that he can pull 
the changes to the file system of the puppet master server.  


 The problem is, once i git pulled from the hotfix branch, these changes 
 are in the file system. There is no going back. 
 Even if i remove the branch from the remote repository and pull from it 
 again, the changed files from the branch are still in the file system.


 Is there any way to realize this?
 *
 *

 -- 
 You received this message because you are subscribed to the Google Groups 
 Git for human beings group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to git-users+...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/groups/opt_out.



-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.