nemisj / git-removed-branches Goto Github PK
View Code? Open in Web Editor NEWGit: List or remove local tracked branches, which are deleted from the remote.
Git: List or remove local tracked branches, which are deleted from the remote.
i have branches with ticket numebrs in it so like:
#345 - escape hashmark in branchname before delete
Got this error for them:
ERROR: Unable to remove: Command failed: git branch -D #345---escape-hashmark-in-branchname-before-delete fatal: branch name required
So #
should escape with \
so the working command is:
git branch -D \#345---escape-hashmark-in-branchname-before-delete
I don't know are there any similiar charater that should be escaped before deleting.
After one of my branches got merged and I deleted that on GitHub, I installed this though npm, and while on the same branch I ran the command to delete the branch. It asked me to run git fetch -p
I ran it, but still its issuing me the command to run git fetch -p
again.
➜ git:(master) npm install -g git-removed-branches
added 2 packages, and audited 3 packages in 836ms
found 0 vulnerabilities
➜ git:(master) git removed-branches
RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded
at new NodeError (node:internal/errors:372:5)
at Socket.onChildStdout (node:child_process:461:14)
at Socket.emit (node:events:527:28)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:293:11)
at Socket.Readable.push (node:internal/streams/readable:234:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
Googled around a bit but didn't see anything obvious so I figured I'd submit here :)
Hello, today i tried to prune my branches using your approach but when i tried to delete some error occurred as you can see in the screenshot
I think it can be a problem with the deleteBranches implementation in find-stale.js.
It is using single quotes
i would change the line 256
var exec = utils.asyncExec(['git', 'branch', dFlag, "'" + branchName + "'"]);
To
var exec = utils.asyncExec(['git', 'branch', dFlag, branchName ]);
I am using windows, maybe in linux could work with single quote but i didn't test yet
When I run the command npx git-removed-branches -r
it gives an error and shows me nothing more than that.
I am on Windows 10
npx git-removed-branches -r
Error: Command failed: git ls-remote -h
at ChildProcess.exithandler (node:child_process:398:12)
at ChildProcess.emit (node:events:527:28)
at maybeClose (node:internal/child_process:1092:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
When branch has no config on remote it is not listed as local branch and therefore not deleted.
Hi there,
First, this is actually not a issue!
Second, thanks for writing sharing this code, really useful!
Since you have made a Python version, what do you think about releasing it as a Python module so it could be easily published (and installed from) http://pypi.org?
I'm willing to help with all the process, just let me know if you think it's a good idea.
Regards,
Alceu
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.