Can I push sub branch if the branch hasn't been merged yet?

iJava :

We work the following way. I create separate branch for every issue and when the issue is done I push it to remote repo. I mean, I do

git branch issueXXX
git checkout issueXXX
//commits
git push origin issueXXX

After that team leader merges my branch to master.

Now I have a problem - I pushed the last issue, but team leader hasn't merged it to master yet and I have no idea when he will do it. However, my next issue is linked to the previous one. What should I do this way? I thought about creating sub branch from issueXXX and push it separately to remote, but I don't know if it possible as my previous issue hasn't been merged yet.

Could anyone say if is it possible or I should do something different (I just learn git)?

Maroun :

Yes, you can branch off issueXXX and push separately.

You'll now have two PRs. The latest will include the commits that already exist in the branch issueXXX. Once this branch is merged, the other PR will be left with the diff commits.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=293715&siteId=1