Comments (14)
@bokuweb You rock! I would lean towards separate commands e.g.
Create stuff:
add
branch
tag
List stuff:
listFiles
listBranches
listTags
Delete stuff:
remove
deleteBranch
deleteTag
Helps prevent making mistakes like accidentally delete when you meant to create, etc.
from isomorphic-git.
What about pushing changes after removing branch locally?
Add a delete: boolean
parameter to the push
command that sets oid
to... I think it's 20 zeros? No, 40 zeros. (20 bytes, in hex). It's something like that.
At least... that would be the way to do it that most resembles the git CLI. It would actually tree-shake better to make deleteRemoteBranch
its own function.
Edit: Yeah I'm leaning towards adding a deleteRemoteBranch
command.
from isomorphic-git.
@wmhilton Thanks :) I'll try to implement if get a chance.
from isomorphic-git.
How'd deleting a branch actually work? I think it would mean removing a Git ref, right, because branches are refs and refs are Git objects? Can you post a quick and rough rundown of what it would entail?
Edit: "ninja-edit" after a good nights sleep to use actual English grammar and shizz
from isomorphic-git.
🎉 This issue has been resolved in version 0.22.0 🎉
The release is available on:
Your semantic-release bot 📦🚀
from isomorphic-git.
I don't see a delete remote branch in the docs, is there a way to do that?
from isomorphic-git.
Is there plans to implement something along the lines of deleteRemoteBranch
? If not, are we able to create a GH issue for tracking purposes?
from isomorphic-git.
Is there plans to implement something along the lines of
deleteRemoteBranch
? If not, are we able to create a GH issue for tracking purposes?
Any updates on this?
from isomorphic-git.
You need to create another issue for this. Also if you want this to be added to the library someone needs to write the code, the main author left the project so it's up to contributors like you to implement this.
from isomorphic-git.
@wmhilton Hi :) I'll implement this command. So, should I implement it with either deleteBranch
command or branch
command with --delete
option ?
from isomorphic-git.
Yes! So, basically all a deleteBranch command needs to do is:
- delete
${gitdir}/${GitRefManager.expand({ref})}
- delete the line in
${gitdir}/packed-refs
if it exists
from isomorphic-git.
If you want to get super fancy about it, the ideal implementation would be to add a deleteRef
function to GitRefManager and then wrap that.
from isomorphic-git.
What about pushing changes after removing branch locally?
from isomorphic-git.
You need to create another issue for this. Also if you want this to be added to the library someone needs to write the code, the main author left the project so it's up to contributors like you to implement this.
Excellent, thank you for the fast reply.
from isomorphic-git.
Related Issues (20)
- Properly propagate error encountered when reading response from git-upload-pack POST request HOT 4
- No shallow directory error HOT 3
- isPromiseFs fails on Deno HOT 9
- Improve `normalizePath` performance HOT 6
- pushing a tag to a target branch fail HOT 1
- Empty response from git server when using code bundler HOT 33
- Pushing returning 401 Error: No Anonymous Write Access HOT 6
- Tests are failing on Android HOT 15
- Cloning empty repository fails if git server uses git >= 2.41.0 HOT 5
- Getting a 404 with azure devops HOT 1
- not respecting server capabilities ( report-status ) HOT 1
- How can I abort a push operation on Node? AbortController seems to be not supported. HOT 2
- Codespell workflow needs approval
- Disable failing test that require credentials on Azure DevOps HOT 14
- Race condition makes it possible for a ref to be resolved to an empty string while it's in the middle of being updated HOT 16
- Invalid refs should throw HOT 11
- Isomorphic git functionality is broken on any browser
- Error Running Linter on main locally HOT 4
- Github Clone Broken on Latest Version HOT 6
- Pushing an annotated tag has slightly different behavior between isomorphic-git and Git 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 isomorphic-git.