Comments (5)
Well, git merge
may introduce merge conflicts. That's generally why the two operations are separate. git pull
is (basically) a kind of alias for git fetch
directly followed by git merge
.
With only git fetch
, we can inspect the differences between the repos before attempting a merge. Though, I assume you would want to merge upstream changes anyway, if you're syncing the repos. The only question is what do we do in the case of a merge conflict. The script would have to alert the user that a merge conflict exists in xyz repos after syncing.
Also, we want to avoid merge commits. I don't know what the formula is for git fetch
+ git merge
, but git pull --rebase
rebases the repo on top of upstream changes, instead of creating merge commits. That's what we want to accomplish, regardless of what we do.
from web.
Right. I guess the question is what do we want the script to do. IOW, if someone is using the script to sync everything, isn't it because they want everything synced? Why would there be merge conflicts? If they're actively working on one of the ~400 repositories, then maybe they wouldn't be using the script to sync everything until they were done? (I'm asking; I'm not doing any with these but having them there for testing; frankly, if I did make changes, I want them to go away if I resync. But I don't know how anyone else uses a full synced WD copy.)
Alternatively, if that is commonly done (making changes to the bulk-synced versions of the repositories while still wanting to sync everything and keep the changes), maybe we have the script check for the presence of a (empty) file, either in the repository or at the top level of the sync directory, that tells the script to skip doing a merge (or a fetch?)
Bottom line, it's easy enough for me to just run a git merge on every directory every time I sync. I'm just trying to figure out if we can make things easier on everyone else (and me) by making a change to the script that will do the right thing and not do the wrong thing. Maybe a --pull
flag that says use git pull --rebase
instead of git fetch
? The default would do what it does now, fetch
only, using the flag would do a pull --rebase
instead.
from web.
Merge conflicts can happen (they have to me) and it's an important error case we have to consider. I think it would be helpful if the script was updated to do a git pull --rebase
automatically; but, it should silence git's pull output unless either --verbose is invoked, or there is a merge conflict, in which case the script should alert the user.
from web.
All right, I'll need to create some merge conflicts (with my repositories, not SE's :)) and see how best to handle them. I'll work on it.
from web.
Closed due to inactivity
from web.
Related Issues (20)
- Order of scan sites HOT 1
- Are find-* changes editorial? HOT 1
- Documentation on downloading in paperwhite/voyage/oasis browser HOT 3
- Suggested alternative to GitHub HOT 2
- RSS feed for new releases promoting to a Patreon email address HOT 1
- CSS Bug when hovering 3D Book HOT 9
- List of Authors HOT 5
- allow sorting by first publication date HOT 2
- Have web view of ebook respect color scheme HOT 5
- Default margin for figures HOT 11
- Donation request overlays and obscures content on kindle browser HOT 1
- "mail to kindle" not supported for azw3. Switch to epub? HOT 1
- [Enhancement] `se titlecase` usage note in Step-by-Step guide HOT 2
- Kindle is now compatibe with epub HOT 2
- Duplicate repo causes sync errors HOT 1
- Book titles wrap on narrow displays HOT 2
- Step by Step historical anomalies HOT 1
- Wording in 8.7.5.3.2 (Quotation marks) HOT 1
- Cover art catalog HOT 4
- Cover art database HOT 38
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from web.