qw3rtman / git-fire Goto Github PK
View Code? Open in Web Editor NEW:fire: Save Your Code in an Emergency
License: MIT License
:fire: Save Your Code in an Emergency
License: MIT License
Npm module would be a great option. Shelljs anyone?
Hooks could prevent the code from being pushed. In the state of an emergency I'd want my code to be pushed, regardless.
I have version 0.2.3 and I'm using Ubuntu 18.04 with sh symlinked to dash. When I run git fire against a repo with a stash, the stash isn't branched and pushed.
~/git/test(master) ยป git fire
Switched to a new branch '[email protected]'
On branch [email protected]
nothing to commit, working tree clean
Host key fingerprint is SHA256:UFAjDQH4wwzmGkeNYpztD5NuaIBVkrdFIuoaEN4vCVQ
+---[ECDSA 256]---+
|o.*E+o**+ |
|+*X+o..o.. |
|=O.B.o. |
|* +=O . |
|o=oo+o S |
|o+ o.. |
|o . |
| |
| |
+----[SHA256]-----+
X11 forwarding request failed on channel 0
Total 0 (delta 0), reused 0 (delta 0)
To gitlab.example.com:sample/test.git
* [new branch] [email protected] -> [email protected]
Branch '[email protected]' set up to track remote branch '[email protected]' from 'origin'.
/usr/local/bin/git-fire: 51: /usr/local/bin/git-fire: [[: not found
I can silence the error and push the stash by editing /usr/local/lib/mode_modules/git-fire/git-fire to replace the first line (#!/usr/bin/env sh
) with either #!/usr/bin/env bash
or #!/usr/bin/env zsh
. I suspect that dash's lack of support for [[ causes this and it will affect other users of Debian-like distros.
Maybe you should push the stash aswell to ensure nothing gets lost
Output from command:
Switched to a new branch '[email protected]'
[[email protected] 9cc522d] @A
1 file changed, 176 deletions(-)
delete mode 100644 app/build.gradle
fatal: 'Client
origin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Leave building!
with #23 being implemented, the current workspace is left at random state, i.e branch that last stash was pushed.
but i would like it to stay in the branch i was before the fire alarm.
in fortunate case the fire was bogus fire call, i would like to resume my work from the branch i was on.
What if there was a version that was a .bat script for Windows? You could get the email, repo name and branch name from git, etc.
EDIT: I have made a rough conversion of git-fire to python, but will keep this windows open, as it doesn't have some of the same functionality.
In the case of a fire in a large organisation, I feel that using only the unix epoch and branch name could be catastrophic, since many developers will perform git-fire
at the exact same moment as each other.
I suggest this is fixed by using some sort of UUID to prevent any kind of conflict that multiple developers may have in the case of a fire.
git pr origin gitout -m "git out improvement"
When a user has GPG signature by default enabled in .gitconfig
the GPG agent may require password input or a security key which should be skipped in case of fire.
hello! i'd like to add this software to Homebrew, but in order to do so the maintainer must provide a way to automatically download a specific numbered release. would you mind tagging a versioned release?
I will actually like to have that "In case of fire" poster in my cubicle, but too lazy to recreate it myself.
I just came back after a while to check this script.
The version number is still 0.0.1, although the script was further developed...
So it is not possible to see with one glance at the number, if there is a newer version available
git symbolic-ref HEAD
returns this error:
fatal: ref HEAD is not a symbolic ref
git branch
before running:
git branch
after running:
If a file doesn't have read permissions (i.e. ~/.gnupg/S.gnupg-agent), it should commit all other files.
The full catastrophe:
`joshua@Debian:~/Documents$ ./git-fire
fatal: ref HEAD is not a symbolic ref
fatal: ref HEAD is not a symbolic ref
Switched to a new branch 'fire---1501874925'
error: open(""): Permission denied
error: unable to index file
fatal: updating files failed
On branch fire---1501874925
Changes not staged for commit:
Untracked files:
no changes added to commit
fatal: ambiguous argument 'stash': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
Leave building!`
When having multiple remotes, waiting for all while pushes are going out sequentially seems to be very bad idea in case of fire.
(Well, taking a time to run this script in case of real fire might be a bad idea in itself).
If one of the remotes is not responsive, it will delay pushes to others, and if one remote shows a password prompt, then the whole thing is blocked...
via reddit
/u/VerticalEvent has a point, if you have multiple devs using the same branch this could get hell of confusing after.
To be frank, i really didnt quite grasp the working of git-fire. Would it be better if we had a video demonstration as to how this is useful??
In the past year alone, several prominent engineers have died fixing code-formatting lint issues prior to commits during natural disasters and fires. The commit should run with -n in case you are running with commit hooks.
Record the CPU temp and if it goes above a certain threshold for longer than a few seconds (to make sure small glitches don't cause random pushes), automatically execute the command. I'm not sure if the way CPU's measure temperature would be able to measure high enough temperature to know it's a fire, but in theory this would work.
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.