https://github.com/b1f6c1c4/hub-sync
Sync your github forks without git.
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.4%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Sync your github forks without git.
Basic Info
- Host: GitHub
- Owner: b1f6c1c4
- License: mit
- Language: JavaScript
- Default Branch: master
- Homepage: https://www.npmjs.com/package/@b1f6c1c4/hub-sync
- Size: 77.1 KB
Statistics
- Stars: 24
- Watchers: 3
- Forks: 1
- Open Issues: 4
- Releases: 2
Topics
Metadata Files
README.md
@b1f6c1c4/hub-sync
Sync your github forks without git in O(1) time, space, and network BW.
Basic usage
Install the package with npm (nodejs package manager).
bash npm i -g @b1f6c1c4/hub-syncUpdate your fork instantly. For the first time you run this, you will be asked to generate a GitHub Personal Access Token. Follow the instructions carefully and keep your token CONFIDENTIAL.
bash hub-sync <name-of-your-fork-repository>
Advanced usage
Update a certain branch:
bash hub-sync <repo>/<branch>Update from another user's fork:
bash hub-sync <your-repo> <another-user>Update from another user's fork, but with a different name:
bash hub-sync <your-repo> <another-user>/<repo>Update from another user's fork, but with a different name and a different branch:
bash hub-sync <your-repo>/<branch> <another-user>/<repo>/<branch>Point a branch of your repo to a specific SHA-1: (rarely used)
bash hub-sync <your-repo>/<branch> <sha-1>Create a new branch:
bash hub-sync -c <destination> <source>Update even if not fast-forward: (EXTREMELY DANGEROUS)
bash hub-sync -f <destination> <source>Delete a branch: (EXTREMELY EXTREMELY DANGEROUS)
bash hub-sync --delete <destination>See
hub-sync --helpfor the complete usage documentation.
Notice: There is NO SAFETY NET at all for -f|--force and -d|--delete.
YOU MAY LOSE ALL YOUR WORK ON THAT BRANCH IMMEDIATELY if not used properly.
Neither Github nor the author of hub-sync will be responsible for your loss.
USE AT YOUR OWN RISK. REFER TO THE LICENSE FOR LEGAL ISSUE.
Technical details
To keep your github fork up-to-date, the old-fashioned way is:
sh
git clone https://github.com/<you>/<repo>
cd <repo>
git remote add upstream https://github.com/<other>/<repo>
git fetch upstream
git push origin upstream/master<master>
cd ..
rm -rf <repo>.git
However, this is totally pointless since you actually download all the data from github.com and upload all the way back. (I know git may be smart enough to upload only what github.com already has, but you have to download everything first.)
This approach takes as bad as O(n) time, O(n) space, O(n) network bandwidth.
So the solution is to call Github API directly: ```sh
Assuming you are using HTTPie:
http GET https://api.github.com/repos/
Find object.sha, and
http PATCH https://api.github.com/repos/
If branch non-exist, use the following instead
http POST https://api.github.com/repos/
Now hub-sync does this for you, as smooth as O(1):
```sh
This can be ran everywhere; it works without git.
hub-sync [-f|-c|-d]
Wanna take more control over the process, but not to clone everything?
You will need git-get and git-fancy-push.
The latter one resolved the long-standing "shallow update not allowed" problem.
bash
git get -g <you>/<repo>
git remote add upstream ...
git fancy-push upstream origin/master:master
License
MIT
Owner
- Login: b1f6c1c4
- Kind: user
- Location: NJ, USA
- Company: Princeton University
- Repositories: 26
- Profile: https://github.com/b1f6c1c4
52BE D143 A92D BE96 2B83 092B 9BAC 0164 9600 1E70
GitHub Events
Total
- Delete event: 2
- Push event: 2
- Pull request event: 5
- Create event: 3
Last Year
- Delete event: 2
- Push event: 2
- Pull request event: 5
- Create event: 3
Committers
Last synced: 8 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| b1f6c1c4 | b****4@g****m | 27 |
| dependabot[bot] | 4****] | 13 |
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 4
- Total pull requests: 16
- Average time to close issues: 23 days
- Average time to close pull requests: 9 days
- Total issue authors: 2
- Total pull request authors: 2
- Average comments per issue: 0.5
- Average comments per pull request: 0.06
- Merged pull requests: 14
- Bot issues: 0
- Bot pull requests: 15
Past Year
- Issues: 0
- Pull requests: 2
- Average time to close issues: N/A
- Average time to close pull requests: about 6 hours
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 2
Top Authors
Issue Authors
- b1f6c1c4 (3)
- IoriOikawa (1)
Pull Request Authors
- dependabot[bot] (17)
- b1f6c1c4 (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- npm 45 last-month
- Total dependent packages: 1
- Total dependent repositories: 1
- Total versions: 4
- Total maintainers: 1
npmjs.org: @b1f6c1c4/hub-sync
Sync your github forks without git.
- Homepage: https://github.com/b1f6c1c4/hub-sync#readme
- License: MIT
-
Latest release: 0.3.1
published over 5 years ago
Rankings
Maintainers (1)
Dependencies
- @types/color-name 1.1.1
- ansi-regex 4.1.0
- ansi-styles 3.2.1
- ansi-styles 4.2.1
- axios 0.21.2
- camelcase 5.3.1
- chalk 4.1.0
- cliui 5.0.0
- color-convert 2.0.1
- color-convert 1.9.3
- color-name 1.1.4
- color-name 1.1.3
- cross-spawn 6.0.5
- debug 4.1.1
- decamelize 1.2.0
- emoji-regex 7.0.3
- end-of-stream 1.4.1
- execa 1.0.0
- find-up 3.0.0
- follow-redirects 1.14.8
- get-caller-file 2.0.5
- get-stream 4.1.0
- has-flag 4.0.0
- invert-kv 2.0.0
- is-fullwidth-code-point 2.0.0
- is-stream 1.1.0
- isexe 2.0.0
- lcid 2.0.0
- locate-path 3.0.0
- map-age-cleaner 0.1.3
- mem 4.3.0
- mimic-fn 2.1.0
- ms 2.1.2
- nice-try 1.0.5
- npm-run-path 2.0.2
- once 1.4.0
- os-locale 3.1.0
- p-defer 1.0.0
- p-finally 1.0.0
- p-is-promise 2.1.0
- p-limit 2.2.0
- p-locate 3.0.0
- p-try 2.2.0
- path-exists 3.0.0
- path-key 2.0.1
- pump 3.0.0
- require-directory 2.1.1
- require-main-filename 2.0.0
- semver 5.7.0
- set-blocking 2.0.0
- shebang-command 1.2.0
- shebang-regex 1.0.0
- signal-exit 3.0.2
- string-width 3.1.0
- strip-ansi 5.2.0
- strip-eof 1.0.0
- supports-color 7.1.0
- which 1.3.1
- which-module 2.0.0
- wrap-ansi 5.1.0
- wrappy 1.0.2
- y18n 4.0.1
- yargs 13.2.4
- yargs-parser 13.1.2
- axios ^0.21.1
- chalk ^4.1.0
- debug ^4.1.1
- yargs ^13.2.4