Comments (4)
@njamesp Hi; I'm having a bit of trouble figuring out the proper way to handle bare repositories. It seems like git does some strange things behind the scenes depending on how you have your repo set up.
Can you paste your repo's config
file? Scrub URLs if you want but leave the rest of the file intact if possible. Also, what's your usual method for updating the mirrors (since git pull
doesn't work, is it just git fetch
or something else)? Thanks!
from git-repo-updater.
Thanks for the quick response! See below.
On May 30, 2015, at 2:30 PM, Ben Kurtovic [email protected] wrote:
@njamesp https://github.com/njamesp Hi; I'm having a bit of trouble figuring out the proper way to handle bare repositories. It seems like git does some strange things behind the scenes depending on how you have your repo set up.
[core]
repositoryformatversion = 0
filemode = true
bare = true
ignorecase = true
precomposeunicode = true
[remote "stash"]
url = ssh://[email protected]/ ssh://[email protected]/...
fetch = +refs/heads/:refs/remotes/stash/
[remote "origin"]
url = /Users/nparrish/Numerica/...
fetch = +refs/heads/:refs/remotes/origin/
Can you paste your repo's config file? Scrub URLs if you want but leave the rest of the file intact if possible. Also, what's your usual method for updating the mirrors (since git pull doesn't work, is it just git fetch or something else)? Thanks!I usually do just git fetch, but that doesn’t update any tracking branches.
In a bare repo, you can do:
git branch Foo origin/Foo
But then if origin/Foo changes upstream, the local version of Foo does not change with a fetch.
So, the primary issue I run into is that you can’t checkout a branch to update it.
—
Reply to this email directly or view it on GitHub #14 (comment).
from git-repo-updater.
Thanks, I think I've got a satisfactory solution for this.
There was a bug with remote fetching in certain cases (but not yours); I fixed that in a9e2a1f.
In 5a4e49e I fixed the error you were having. Remotes are updated correctly, but no branches are modified, so gitup acts like a batch git fetch
.
In 31a9477 I redid the way branch updates work. For any branch where you've explicitly set an upstream (such as by doing git branch foo origin/foo
as you mentioned), gitup should correctly fast-forward it on updates, but won't do anything if a merge or rebase is required. Since you're we're dealing with bare repos here, that should always work, unless someone does something funny (forced pushes that break history?) in which case you'll have to deal with that manually.
from git-repo-updater.
Awesome. This is working much better now. Thanks for the quick fix.
Nick
On Jun 6, 2015, at 12:39 AM, Ben Kurtovic [email protected] wrote:
Thanks, I think I've got a satisfactory solution for this.
There was a bug with remote fetching in certain cases (but not yours); I fixed that in a9e2a1f a9e2a1f.
In 5a4e49e 5a4e49e I fixed the error you were having. Remotes are updated correctly, but no branches are modified, so gitup acts like a batch git fetch.
In 31a9477 31a9477 I redid the way branch updates work. For any branch where you've explicitly set an upstream (such as by doing git branch foo origin/foo as you mentioned), gitup should correctly fast-forward it on updates, but won't do anything if a merge or rebase is required. Since you're we're dealing with bare repos here, that should always work, unless someone does something funny (forced pushes that break history?) in which case you'll have to deal with that manually.
—
Reply to this email directly or view it on GitHub #14 (comment).
from git-repo-updater.
Related Issues (20)
- “PackingType of packed-Refs not understood” HOT 5
- Homebrew Installation Requires Python@2 HOT 3
- Quiet mode - hide repos that are already up to date HOT 2
- Option to ignore some folders on recursive search for git repositories HOT 1
- [feature request] Package Manager Install HOT 4
- PyPI install? HOT 2
- git push? HOT 2
- Add a command to list repositories which have commits recently HOT 3
- Prune and current directory doesn't work? HOT 4
- new release HOT 2
- running tests HOT 1
- clean up deleted repo's? HOT 6
- Is there a way we can set which branch to pull update? HOT 2
- ImportError: No module named configparser HOT 5
- Incompatible with PyOxidizer HOT 3
- Earwig/git-repo-updater
- error: Could not read from remote repository - fails at different point each time HOT 3
- [Suggestion] Add topics to the GitHub repo HOT 1
- Migration to Github Action HOT 2
- [FEATURE] - Option to exclude directory / directories HOT 1
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 git-repo-updater.