D
D
Dimka52019-03-11 13:30:56
git
Dimka5, 2019-03-11 13:30:56

How to continue development in Git without pushing changes to a remote repository?

Initially, the remote and local repository are the same.
I am making new functionality in the local repository.
Created a 'F1' branch for it, fully implemented this functionality, everything is ready.
But there is no way to send changes (pull request).
And at the same time, I want to continue development and do something else from this state (finished F1), making the 'F2' branch for the new functionality
. its history has its own branches for each functionality (as when using the --no-ff key), that is, there was such a picture
5c863461530a2665727534.jpeg
So here's the problem. How do I work locally to create branches and merge changes, and how do I push changes to get it?
Option 1. After implementing F1, should I merge it into master (I do it with --no-ff)? (is it possible? if you are going to send it to the remote? the picture will work on the local, but on the remote?) Then make the F2 branch from master and merge it with master again, then send the changes from the final master branch
OR
Option2. After implementing F1, I make F2 from it F3 from it ....
5c8637b407145469226419.jpeg
Then I send each one individually to a remote repository and do not merge locally with master
. More options?
In general, how do you continue development without access to the main repository?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir, 2019-03-11
@Dimka5

1) Leave Feature 1 in your repository and don’t push it to the master locally
2) If you don’t need changes in Feature 1 for Feature 2, just go to the master, do a git pull and branch for Feature 2
2a) If you need changes for Feature 2 that you did in Feature 1, then after the second step, do gi rebase F1
3) Before making a merge request for both the first feature and the second, you do
git fetch && git rebase origin/master in this way you will pull the updates accumulated in the master into the branch and resolve conflicts if they arise.

A
Arman, 2019-03-11
@Arik

At the moment when you wanted to make f2, is f1 needed in the Master? I think by answering this question you can decide how to work. The master should always be in a combat state, you should not merge other branches into this branch if they are not ready to be immediately sent to the central turnip and into battle

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question