-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
limit pulling the main branch #2657
Comments
Hey Amir, that's a great question and an interesting use case! Here are two ideas that might get you want you want in your situation. I'm using your terminology, i.e. "new branch" for the branch that you created, and "existing branch" for the branch that is the parent of "new branch". You could make the "existing branch" a perennial branch. Perennial branches are long-lived standalone branches like
In the dialog that shows up when you run this command, enable the checkbox next to the "existing branch" name. Now you can run Another idea is to put Git Town into offline mode. In offline mode, Git Town doesn't pull any updates from the network. It just syncs the branches in your local workspace with each other. In this scenario you would have to run git town config offline on |
Thank you! I had actually tried the offline mode, but it doesn't seem to be working for me. It's actually doing the fetch and pull. I'm not sure if I'm doing something wrong 🤔 |
FWIW, the perennial-branches is a great workaround. I'll probably write up a script so that this is easy to set up and sync when I need to |
Some background on how Git works might help understand what's going on here. Due to the nature of Git as a distributed version control system, your local clone contains the entire repo content including all commits and all branches from the server. Git operations like Then you periodically download updates from the server to your local client ( The way offline mode works right now is that it simply doesn't fetch. It still syncs what your local repo is aware of, including local copies of remote branches. This does what it should do as long as you never fetch manually. If you or VSCode runs You can verify whether you have successfully enabled offline mode by running |
FYI there have been a number of reports requesting this feature. I'm collecting them and ideas how to address your use case better in #2711. |
@heyitsaamir assuming Git Town has a feature that allows you to avoid pulling in updates from the master branch. Would you enable this behavior for all your feature branches, or just for a few that you manually select? |
I'd probably enable it by default. I'm used to graphite's model where they only pull things if you explicitly run a
|
Thanks this is helpful, and graphite looks cool! Follow-up question to help me fully understand what you have in mind here.
How is this different from Git Town? Git Town also only pulls things if you run a
Simply don't run I'm sure I'm missing something here. Can you please describe in more detail which exact Git operations you would like to be run (roughly) in each of the scenarios you describe (office with fast internet, traveling with slow internet)? How would an ideal Git Town tool behave in your use case? Thanks! 🙏 |
New features added in v12.1 improve the developer experience around this:
|
Possible implementation: a user-specific config setting
If set to If set to
|
Additional request for this in #2673 (comment) |
Possible idea to implement this: #2171 |
First of all, this probably shouldn't be a github issue, but I'm not sure where else to ask this! I'm just getting started with git town so this might be a basic question --
I work in a big repo with lots of contributors. I created a new branch and
set-parent
to an existing branch. I'd have liked to just have rebased on top of that branch without pulling the latest master (when master gets pulled, i need to do a fullyarn
to download packages etc). Is this possible to do withsync
?The text was updated successfully, but these errors were encountered: