[git-users] Re: GIT project maintainer as a developer

2013-11-20 Thread Huu Da Tran
On Monday, November 18, 2013 2:29:41 PM UTC-5, Greg Freeman wrote:

 I have an issue with my workflow that I'm trying to resolve. I am a 
 developer as well as the project maintainer. We are using the forking 
 workflow so everyone has their own repo then I pull all their changes to my 
 copy to deal with the merge, then push these changes into the master.


All responses by Philip  should be taken into consideration.

When speaking of fork, that is something that was invented for service 
sites like Github or bitbucket where someone would make a clone online and 
that clone is linked to the original for easily make Pull Requests. Are you 
using such services. If so, there is another way so you would not need to 
have different repo names.

Hope this helps,
H.

-- 
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.


[git-users] Re: GIT project maintainer as a developer

2013-11-20 Thread Greg Freeman
Huu you are correct. I left out something that is quite important. I am 
using bitbucket/github depending on the project. This fork is through their 
site. As far as I understand it, the benefit, besides easy pull requests, 
is also so you can push your local changes to a server-side repo without 
them being integrated back into the main code base. Then, if your hard 
drive or something goes bad, your local changes that have been pushed to 
your fork in the cloud are backed up. Am I correct in this understanding 
also?

To answer your question, yes I am using a hosting site, and I'm interested 
in the other way to avoid different repo names.

Thanks,

Greg

-- 
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.


[git-users] Re: GIT project maintainer as a developer

2013-11-20 Thread Huu Da Tran
On Wednesday, November 20, 2013 10:42:28 AM UTC-5, Greg Freeman wrote:

 Huu you are correct. I left out something that is quite important. I am 
 using bitbucket/github depending on the project. This fork is through their 
 site. As far as I understand it, the benefit, besides easy pull requests, 
 is also so you can push your local changes to a server-side repo without 
 them being integrated back into the main code base. Then, if your hard 
 drive or something goes bad, your local changes that have been pushed to 
 your fork in the cloud are backed up. Am I correct in this understanding 
 also?


Yes, but the backup is also possible using any remote server to host that 
file. 
 

To answer your question, yes I am using a hosting site, and I'm interested 
 in the other way to avoid different repo names.


In that case, this is what we are doing. We have a corporate account which 
is the main repo (this is where the project should be created) and each 
developer then fork into their personal account. This could also have 
been possible to achieve without such service, but I'll not explain since 
it does not apply in your case.

Let's assume you have those accounts set up. As maintainer of a project, 
your would have creator/admin privileges (based on bitbucket).

Each dev would do the following:

git clone g...@bitbucket.org:your_account/project_name.git project_name
cd project_name
git remote add main g...@bitbucket.org:company_account/project_name.git

Then, when you code in your changes, you create feature branches according 
to your workflow (I'll assume develop branch).

git checkout -b your_initial/feature-name main/develop

This will create a tracking branch from the company develop branch.

you make your changes, commit them to your local repo... then you push to 
your bitbucket repo:

git push origin your_initial/feature-name

Now, you go on the web interface, and you create a Pull Request to the 
company account, with creating a new branch... by choosing compare and 
choose your account and the your_initial/feature-name on the left side, 
and then the company account and your_initial/feature-name (new 
branch...)   (not sure exactly, but i think it's the last one in the list).

Then, you put on the maintainer hat, and select the company account's repo, 
approve/merge the pull request. This create a new branch. We use this 
approach so developers can continue working on the feature if not 
completed, but as maintainer, we get a sense of changes. Next pull request 
will not be a new branch.  When everything is good and tested, you can 
merge it back to the develop branch by simply choosing compare, select 
your_initial/feature-name and develop, then click merge.

Let me know if anything is not clear, I'll try to formulate it better.

HD.


-- 
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.


[git-users] Re: GIT project maintainer as a developer

2013-11-20 Thread Huu Da Tran
On Wednesday, November 20, 2013 11:36:30 AM UTC-5, Huu Da Tran wrote:

 Then, you put on the maintainer hat, and select the company account's 
 repo, approve/merge the pull request. This create a new branch. We use this 
 approach so developers can continue working on the feature if not 
 completed, but as maintainer, we get a sense of changes. Next pull request 
 will not be a new branch.  When everything is good and tested, you can 
 merge it back to the develop branch by simply choosing compare, select 
 your_initial/feature-name and develop, then click merge.


I forgot to mention the following steps... Then you announce the merge or 
on a daily basis, each developer need to merge back those changes.

on the local machine:

git pull main develop

I like to pull straight from the remote so the merge commit message 
indicates the remote repo and not a local one. But they could also do

git fetch main
git merge main/develop

You will see changes from the develop branch... and also other new branches 
or updated branches following pull requests.

To go further, I usually delete branches from the fork to not confuse when 
doing pull requests. Since developer should not commit to master or 
develop, just delete them from the fork.

HD.

-- 
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.


[git-users] Re: GIT project maintainer as a developer

2013-11-20 Thread Greg Freeman


 In that case, this is what we are doing. We have a corporate account which 
 is the main repo (this is where the project should be created) and each 
 developer then fork into their personal account. This could also have 
 been possible to achieve without such service, but I'll not explain since 
 it does not apply in your case.

 ...

 Then, you put on the maintainer hat, and select the company account's 
 repo, approve/merge the pull request. This create a new branch. We use this 
 approach so developers can continue working on the feature if not 
 completed, but as maintainer, we get a sense of changes. Next pull request 
 will not be a new branch.  When everything is good and tested, you can 
 merge it back to the develop branch by simply choosing compare, select 
 your_initial/feature-name and develop, then click merge.


Perfect, this is exactly what I discussed with my coworkers yesterday. We 
also have a corporate account (which I wasn't aware of ...shame on me for 
taking things into my own hands :-D ). We are going to move the repo there, 
then I will fork that repo for myself and follow the steps you mentioned. 
This is in line with what I was envisioning, which is a good thing because 
it lets me know we are at least on the right track.

-- 
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.


[git-users] Re: GIT project maintainer as a developer

2013-11-20 Thread Greg Freeman
Now that I'm actually digesting this and trying it out, I'm a bit 
confused.  I am using source tree, but I will try and speak in more generic 
terms.

I forked the main repo through bitbucket ( which has master and develop 
branches). This gives me https://myname@bitbucket.org/myname/project 
name.git as the remote repository for my fork. So, I now have *my *fork 
which has master and develop branches. I then set this fork up as my remote 
repository (https://myname@bitbucket.org/myname/project name.git). It 
seems to me it is off this development branch I want to create features. I 
then push those features back to my repository and create a pull request 
off that particular feature to the project repo. This will create a new 
branch in the project repo which can then be merged into the project repo's 
develop branch and then merged into everyone elses local repos. 

Is this correct? 

This brings up another question: when a fork is done on bitbucket, are the 
develop and master branches in the user's fork ever merged with features? 
For instance, do I ever add my feature to my develop branch? Or should my 
develop branch only be updated from the project repos dev branch? Does this 
question make sense? Basically, am I ever merging my features into my 
develop and master branches directly?

-- 
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.


[git-users] Re: GIT project maintainer as a developer

2013-11-20 Thread Greg Freeman
Awesome, I must have overlooked that. That makes much more sense! Thanks!

-- 
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.