Giter Club home page Giter Club logo

gg's Introduction

Hi there πŸ‘‹

gg's People

Contributors

christhomson avatar cosinuz avatar jhermann avatar liyishuai avatar mihai-vlc avatar professorjamesmoriarty avatar qw3rtman 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

gg's Issues

gg l = undefined:5691 "author"

$ gg l
undefined:5691
"author"

SyntaxError: Unexpected end of input
at Object.parse (native)
at /Users/pierre/.nvm/versions/node/v0.12.0/lib/node_modules/gitgoodies/lib/gg.js:513:22
at ChildProcess.exithandler (child_process.js:751:5)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1008:16)
at Process.ChildProcess._handle.onexit (child_process.js:1080:5)

Git log black on black

I have terminal in a dark theme, the git log shows the name and date in dark ansi colors
screenshot

(Windows) gg log error

Typed:
gg l

Result:

undefined:1
[

SyntaxError: Unexpected end of input
    at Object.parse (native)
    at C:\Users\d.semigradsky\AppData\Roaming\npm\node_modules\gitgoodies\lib\gg
.js:383:18
    at ChildProcess.exithandler (child_process.js:751:5)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1008:16)
    at Socket.<anonymous> (child_process.js:1176:11)
    at Socket.emit (events.js:107:17)
    at Pipe.close (net.js:476:12)

Proposal - branch delete - gg bd

Am happy to submit a PR for this, just wanted to gauge interest

Could be

gg bd <branchname>          Deletes local branch in repo

or

gg db <branchname>          Deletes local branch in repo

I feel bd makes more sense as b is used for branch functions

Then could add on top

gg bdr <branchname>        Deletes both local and remote branch

Cheers πŸ™‚

gg s Undefined Output

  1. Clone a repo. For example, git clone https://github.com/wikimedia/apps-android-wikipedia.git.

  2. Enter the repo.

  3. Run gg s.

  4. Note the output appears incorrect:

    branch | master
    position | up-to-date

    undefined
    undefined

Problem cloning

When I clone a repository with gg clone git@git.–––.–:~/git/––––.git or gg cl git@git.–––.–:~/git/––––.git the console prints the error [βœ–] Could not clone repository..

Keeps throwing an error!!

I keep getting an error when running gg s. Tried with node version 0.10.35 and 0.12.0 both running via nvm.

screen shot 2015-03-05 at 11 41 43

gg l > Unexpected end of input error

ian$ gg l
undefined:5361
  "author": "<hidden>"

SyntaxError: Unexpected end of input
    at Object.parse (native)
    at /usr/local/lib/node_modules/gitgoodies/lib/gg.js:513:22
    at ChildProcess.exithandler (child_process.js:723:5)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:169:7)
    at maybeClose (child_process.js:984:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1057:5)

gg s crashes

gg s
branch   | develop
position | up-to-date


/usr/local/lib/node_modules/gitgoodies/lib/gg.js:197
                if (status[4].split(' ')[0] === 'Untracked') {
                              ^
TypeError: Cannot call method 'split' of undefined
    at /usr/local/lib/node_modules/gitgoodies/lib/gg.js:197:19
    at ChildProcess.exithandler (child_process.js:656:7)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:766:16)
    at Socket.<anonymous> (child_process.js:979:11)
    at Socket.emit (events.js:95:17)
    at Pipe.close (net.js:466:12)

Error while commiting : [βœ–] Could not commit changes.

Hi,

i like the gg idea and all but we can't seem to be able to make it work.
We keep running into this problem : [βœ–] Could not commit changes. Try again if there was a large amount of changes to add.

I'm not sure what kind of info we could add he beside that it runs on Ubuntu 14.04 and that normal commits work.

Possibility of integrating this with Github's Hub.

I'm using GitHub's Hub as an extension to Git. I really like this as a developer which uses GitHub a lot since it makes using GitHub easier.

I really like this project as well. I wanted to discuss if and maybe how this project can be linked to GitHub's Hub.

GitHub's Hub

`gg cl` to move inside cloned directory

When most people use the git clone command, they just directly move inside the directory with cd.

I'm suggesting to make gg cl automatically change the current directory to the cloned repo... or maybe add a new command?

Thanks!

new files not reported

tejas at workstation in ~/repos/appupa/website on master [?]
$ gg status
branch   | master
position | up-to-date

staging  | all changes staged
commits  | all changes committed

tejas at workstation in ~/repos/appupa/website on master [?]
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
  (use "git add <file>..." to include in what will be committed)

    lo.txt

nothing added to commit but untracked files present (use "git add" to track)

untracked files not shown

Fetching with wrong password produces wrong output

Normally, when entering the wrong password, git fetch output should be

remote: Invalid username or password.
fatal: Authentication failed for ...

but gg f doesn't produce any error, only shows

[βœ”] Fetched!


Ability to add routines

It would be cool to have the ability to make some of your own "routines". For example, if you had a system of adding all files, committing with a message, and then pushing the files, you could make a "routine" that allows you to do that all at once.

Ex.
screen shot 2015-03-05 at 11 20 41 am

Instead of running those commands every time, you could make a routine, lets say using the command "rr" (stands for "run routine"), that would run all of those for you.

In other words, running the following command would add all files, commit using the message given, and push the files.

gg rr ’My Message’

Some issues

Hello, Thanks to build nice app πŸ‘ But i see some issues:

  1. gg cl don't work on bitbucket ssh
  2. When i use gg c "message" get error /usr/local/bin/gg: line 281: [: report: binary operator expected

gg pl dosen't pull

When I type gg pl GG doesn't make the pull and in the terminal appears the [βœ”] Pulled!

Add gg ch -

One of the really handy git tricks I use all of the time is to use git checkout - which checks out the previously checked out branch. It makes switching back and forth between branches really easy.
Would be happy to submit a pull request, but adding this issue for any discussion.

gg cl returns could not clone repository

I enter command :
gg cl https://github.com/NitroXenon/node-push-test.git
it returns [βœ–] Could not clone repository.

but when I enter command:
gg cl http://github.com/NitroXenon/node-push-test.git
it returns [βœ”] Cloned into 'node-push-test'...

Is it a problem of https?

Error on pushing but the push was performed

I made a commit, I add all the changes gg a then gg c -a COMMIT TEXTand then gg p, but the terminal prints [βœ–] Could not push commits.. When I check if the commit was uploaded with gg logthe last commit was my commit that I couldn't upload because it prints an "error".

[71792bc8d621e24c1974b81473f34d6b9778dea4]
|- Sebastian Masad <***@***.com>
|- Wed Mar 11 16:00:23 2015 -0300
|- COMMIT TEXT

Commands Outside of Repo Have Unexpected Results

Running gg s outside of a Git repo produces a stacktrace:

/usr/local/lib/node_modules/gitgoodies/lib/gg.js:164
                switch (status[1].split(' ')[3]) {
                                 ^
TypeError: Cannot read property 'split' of undefined
    at /usr/local/lib/node_modules/gitgoodies/lib/gg.js:164:20
    at ChildProcess.exithandler (child_process.js:751:5)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1008:16)
    at Socket.<anonymous> (child_process.js:1176:11)
    at Socket.emit (events.js:107:17)
    at Pipe.close (net.js:476:12)

Similarly, gg a outside of a repo makes a false claim:

[βœ”] Added everything!

When I have a pending commit gg don't pull

When I have a pending commit and I run gg plGG outputs: [βœ”] Pulled!but the pull was not performed. When I use the traditional command git pullthe system returns:

Updating a07c89f..5728eba
error: Your local changes to the following files would be overwritten by merge:
app/views/home/catalog.html.erb
Please, commit your changes or stash them before you can merge.
Aborting

Alias for gg command

If user have installed https://github.com/robbyrussell/oh-my-zsh, will catch a problem with alias for gg command, to fix it, open the file git.plugin.zsh:

vim ~/.oh-my-zsh/plugins/git/git.plugin.zsh

And comment the line with:

alias gg='git gui citool'

There is not much to be done about it.


More details about output of command:

where gg

gg: aliased to git gui citool
/usr/local/bin/gg

Add gg d / gg diff

I use the git diff feature all of the time and would love to bring it up through gg.
I will create a pull request, but adding this issue for any potential discussion.

gg s handling of undefined fileds

I'm having a problem when using the gg s command:

D:\Test\test\docs>gg s
branch   | undefined

C:\Users\martin\AppData\Roaming\npm\node_modules\gitgoodies\lib\gg.js:279
    switch (status[1].split(' ')[3]) {
                      ^
TypeError: Cannot call method 'split' of undefined
    at C:\Users\martin\AppData\Roaming\npm\node_modules\gitgoodies\lib\gg.js:279:23
    at ChildProcess.exithandler (child_process.js:662:7)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:766:16)
    at Socket.<anonymous> (child_process.js:979:11)
    at Socket.emit (events.js:95:17)
    at Pipe.close (net.js:466:12)

And here's the output from git status:

$ git status
On branch master
Untracked files:
  (use "git add <file>..." to include in what will be committed)

        Main.txt

nothing added to commit but untracked files present (use "git add" to track)

So, the git repository is there (not related to #31 or #35).

[email protected]

How to revert back?

I am not a pro Command line user. But I always use Git in Command line. I've read about such stuff earlier, what stops me from jumping ahead is what if, I end up with something where there I get help for normal git codes and I won't be able to find how to do that in new zsh terminal. How would I revert? Could you tell? How to revert if something goes wrong?

Add gg pi

Make gg pi (push init) a shortcut for git push -u origin {currentbranch}.

Error when installing on debian

when I run curl -fsSL git.io/gg.sh | sh I get the error

sh: 18: Syntax error: "(" unexpected (expecting "}")

uname -a gives

Linux secret-ninja 4.0.0-2-amd64 #1 SMP Debian 4.0.8-2 (2015-07-22) x86_64 GNU/Linux

How to run multiple command at once?

For any new project we need to run these commands

git init
git commit -a -m "First Commit"
git remote add origin cloud-url
git push --set-upstream origin master

Excpet repeating git commands we only give one info here the cloud-url

I would like these all commands in a single command where I just give cloud-url

gg p claims it could not push, but commits are pushed to git just fine

Using a fresh install of GitGoodies and a folder with an existing repo, I made some changes, committed them, and pushed to GitHub.

dydx@anubis > vim app.js
dydx@anubis > gg a
[βœ”] Added everything!
dydx@anubis > gg c added notes about the delete endpoint not working on the frontend
[βœ”] Added everything!
[βœ”] Commited!
"added notes about the delete endpoint not working on the frontend"

I receive the following message after trying to push to Github:

dydx@anubis > gg p
[βœ–] Could not push commits. (may have to pull first, merge any conflicts, and then attempt to push again using the standard git command.)

I checked on it using regular Git commands and noticed that the changes were already pushed

dydx@anubis ~/D/hackathon2> git push -u origin master
ch master from origin.
Everything up-to-date

Add force-pushing

gg pf for git push --force and gg pfl for git push --force-with-lease

"gg s" on not-git dir produced error

/usr/lib/node_modules/gitgoodies/lib/gg.js:279
switch (status[1].split(' ')[3]) {
^
TypeError: Cannot read property 'split' of undefined
at /usr/lib/node_modules/gitgoodies/lib/gg.js:279:22
at ChildProcess.exithandler (child_process.js:751:5)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1008:16)
at Socket. (child_process.js:1176:11)
at Socket.emit (events.js:107:17)
at Pipe.close (net.js:476:12)

Why Node?

Came across this project through Hacker News.

I like the idea of aliasing common Git commands to shorter abbreviations. That's why I already do it by putting a bunch of aliases in my .gitconfig.

I had a quick browse through the code and it doesn't look like using JavaScript adds a lot of value. As much as I like Node, I'm also a big proponent of using the right tool for the right job. Specifically for gg, it looks like Node mainly adds an additional dependency as well as a binary to run before forking out to Git.

So I guess my question is: are you planning to add features to gg that can't be accomplished with some Git aliases?

(Not trying to be hostile. Just curious about your choice of platform.)

GitHub clone default username

It'd be great if easy cloning from GitHub via #8 had some way of defaulting a to a persisted username for the current user, so we could download our own repos by name only, like hub.

List changed files?

A regular 'git status' shows what files have been changd, but 'gg s' just shows there are some changed files, but not what. Is there a gg command which lists the changes?

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.