Giter VIP home page Giter VIP logo

git-fire's Introduction

Hi there ๐Ÿ‘‹

git-fire's People

Contributors

alexdenvir avatar bricewge avatar edwinbalani avatar fedjmike avatar glensc avatar gnithin avatar jgkamat avatar pault-pg avatar qw3rtman avatar rayne avatar tiborsaas avatar xender avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

git-fire's Issues

Npm module

Npm module would be a great option. Shelljs anyone?

shell portability problems: dash not supported

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.

Stash

Maybe you should push the stash aswell to ensure nothing gets lost

git stash leaves workspace dirty

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.

.bat version for Windows?

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.

Chance of branch conflict within large organisation

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.

Consider commiting with `--no-gpg-sign`

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.

tag a versioned release

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?

The Poster

I will actually like to have that "In case of fire" poster in my cubicle, but too lazy to recreate it myself.

Update version info

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

Fails when HEAD is detached or files don't have read permission

git symbolic-ref HEAD returns this error:
fatal: ref HEAD is not a symbolic ref
git branch before running:

  • detached head
    master

git branch after running:

  • fire---1501874925
    master

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!`

Could pushing to remote repositories do paralellized?

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...

Git commit should run with -n

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.

An idea to make this actually (maybe) useful in case of a fire

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.