qw3rtman / gg Goto Github PK
View Code? Open in Web Editor NEWGit Goodies: At-A-Glance, Efficient, and Aesthetically Pleasing Git Shortcuts
Home Page: https://git.io/gitgoodies
License: MIT License
Git Goodies: At-A-Glance, Efficient, and Aesthetically Pleasing Git Shortcuts
Home Page: https://git.io/gitgoodies
License: MIT License
I made a commit, I add all the changes gg a
then gg c -a COMMIT TEXT
and then gg p
, but the terminal prints [β] Could not push commits.
. When I check if the commit was uploaded with gg log
the 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
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
It looks cool
See https://github.com/jhermann/ruby-slippers/commits/master/home/bin/gg for more quoting fixes, and the problem with inserting data directly into printf formats (which is wrong, try '% boom!' as a commit msg).
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.
.
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)
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.
It looks like function exports.cloneURL
is missed in commit 3d1b2d2
Search: https://github.com/qw3rtman/gg/search?utf8=%E2%9C%93&q=cloneURL&type=Code
A common use case for me is to merge changes from my upsteam dependencies. (Ex: I fork a repo)
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?
$ 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)
When I have a pending commit and I run gg pl
GG outputs: [β] Pulled!
but the pull was not performed. When I use the traditional command git pull
the 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
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.
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
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?
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
When I make git pull
git prints what files have been changed, would be awesome when I make gg pl
GG show me what file have been changed.
When I type gg pl
GG doesn't make the pull and in the terminal appears the [β] Pulled!
How about adding some pretty graphs like in: http://stackoverflow.com/a/9074343? It's a really nice way to see you repo status.
XXX@XXX:~$ curl -fsSL git.io/gg.sh | sh
sh: 18: Syntax error: "(" unexpected (expecting "}")
Got the source and installed it manually though.
gg pf
for git push --force
and gg pfl
for git push --force-with-lease
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?
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
Make gg pi
(push init) a shortcut for git push -u origin {currentbranch}
.
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!
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.
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!
Hello, Thanks to build nice app π But i see some issues:
gg c "message"
get error /usr/local/bin/gg: line 281: [: report: binary operator expected
gg does not supply a --version
/ -v
option to print version information.
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 π
I added the individual files using git add command but when using gg c, it automatically added all the files. Is that a bug or feature?
Clone a repo. For example, git clone https://github.com/wikimedia/apps-android-wikipedia.git
.
Enter the repo.
Run gg s
.
Note the output appears incorrect:
branch | master
position | up-to-date
undefined
undefined
Something like "gg r" will do
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!
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)
/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)
GG is exciting! May u add support command for git remote
?
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)
It shows this error [β] Could not pull commits. (may have to pull using the standard git command to handle merge conflicts.)
. When I pull with standard git command, it shows Current branch master is up to date.
I am using OSX 10.10
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.
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β
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).
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.)
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.
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
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.