golbin / git-commander Goto Github PK
View Code? Open in Web Editor NEWA git tool with an easy terminal interface.
License: MIT License
A git tool with an easy terminal interface.
License: MIT License
I'd be interested in submitting PRs for this or publishing it as its own tool so let me know if it fits with the goal of the project
Just installed this, very nice.
Seems that jk works nicely in the reflog (as does C-d / C-u nice!) but does not work in the main panel.
Hey hey,
I just tried your project, and it looks nice.
What I would find really helpful to see the actual branch name when using git-commander
.
In our workflows we usually name the branches with e.g. github issue numbers and connect via '#' to the issue.
E.g.
Branch name: feature/123-some-feature
Commit Msg: #123 add something
Thanks. :)
I'm using git through screen where Ctrl-a
is special combination to switch to screen options. So this way I can't use most of the keys from git-commander
Add directory_name as a prefix before branch_name like "directory_name:branch_name"
Hi, nice command. :)
Testing here I found some strange behavior when you has 'commit inicial' in log message.
TypeError: Cannot read property 'name' of undefined
at /usr/lib/node_modules/git-commander/controller/log.js:59:48
line = line + " {cyan-fg}<" + item.author.name + ">{/cyan-fg}";
author is undefined then I changed with:
line = line + " {cyan-fg}<" + (item.author ? item.author.name : 'cu') + ">{/cyan-fg}";
Now it works but with other strange effect, now I have one commit more with:
'inicial' 'No message' 'NaN month' 'Cu' (hash, message, time, author)
So I can think that this problem is about how code split commits :-/
:)
Had an antiquated version of blessed
on my rig. Automatic installation with npm did not catch it, and got an undefined error at git-commander
start. npm install blessed
fixed it.
How to handle conflict?
I installed it globally on node v0.10.26. When i tried to run it an error occurs with this stack;
TypeError: undefined is not a function
at Git.status (/usr/local/lib/node_modules/git-commander/model/git.js:70:16)
at Object.main.reload (/usr/local/lib/node_modules/git-commander/controller/main.js:94:9)
at Object. (/usr/local/lib/node_modules/git-commander/bin/git-commander:3:31)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3
Key shortcuts do not show up.
When I am editing a commit, I am not able to navigate via the arrow keys. If a want to fix a misspelled word I must use backspace.
Show diff of an selected file.
Can be replicated (currently) with a clone of https://github.com/ramda/ramda
-- CHRIS
$ pwd
/home/cms/source/ramda
$ ls
BOOKMARKLET.md CHANGELOG.md dist LICENSE.txt package.json scripts test
bower.json CONTRIBUTING.md lib Makefile README.md src testem.json
$ git-commander
.. then press CTRL-L ...
TypeError: Cannot read property 'slice' of null
at /home/cms/.nvm/versions/node/v0.12.7/lib/node_modules/git-commander/node_modules/blessed/lib/program.js:2543:35
at Array.forEach (native)
at Program._attr (/home/cms/.nvm/versions/node/v0.12.7/lib/node_modules/git-commander/node_modules/blessed/lib/program.js:2542:11)
at Box.Element._parseTags (/home/cms/.nvm/versions/node/v0.12.7/lib/node_modules/git-commander/node_modules/blessed/lib/widgets/element.js:498:26)
at Box.Element.parseContent (/home/cms/.nvm/versions/node/v0.12.7/lib/node_modules/git-commander/node_modules/blessed/lib/widgets/element.js:393:22)
at Box. (/home/cms/.nvm/versions/node/v0.12.7/lib/node_modules/git-commander/node_modules/blessed/lib/widgets/element.js:184:10)
at Box.EventEmitter._emit (/home/cms/.nvm/versions/node/v0.12.7/lib/node_modules/git-commander/node_modules/blessed/lib/events.js:94:20)
at Box.EventEmitter.emit (/home/cms/.nvm/versions/node/v0.12.7/lib/node_modules/git-commander/node_modules/blessed/lib/events.js:117:12)
at emit (/home/cms/.nvm/versions/node/v0.12.7/lib/node_modules/git-commander/node_modules/blessed/lib/widgets/node.js:109:15)
at ScrollableBox.Node.insert (/home/cms/.nvm/versions/node/v0.12.7/lib/node_modules/git-commander/node_modules/blessed/lib/widgets/node.js:111:5)
$ cd /home/cms/.nvm/versions/node/v0.12.7/lib/node_modules/git-commander/
$ cat package.json
{
"name": "git-commander",
"version": "0.0.14",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/golbin/git-commander.git"
},
"homepage": "https://github.com/golbin/git-commander",
"bugs": {
"url": "https://github.com/golbin/git-commander/issues"
},
"dependencies": {
"blessed": "^0.1.7",
"lodash": "^3"
},
"devDependencies": {},
"engines": {
"node": "^0.12"
},
"main": "controller/main.js",
"bin": {
"git-commander": "./bin/git-commander"
},
"keywords": [
"git",
"terminal"
],
"directories": {
"doc": "doc"
},
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"gitHead": "7962bb4d22f26e2459aea8c8a640b1226fa60e90",
"description": "A git tool with an easy terminal interface.",
"_id": "[email protected]",
"_shasum": "9c0c4fca2fa2594e394f5cee0834af78b7c68ccd",
"_from": "git-commander@*",
"_npmVersion": "2.13.4",
"_nodeVersion": "0.12.7",
"_npmUser": {
"name": "golbin",
"email": "[email protected]"
},
"maintainers": [
{
"name": "golbin",
"email": "[email protected]"
}
],
"dist": {
"shasum": "9c0c4fca2fa2594e394f5cee0834af78b7c68ccd",
"tarball": "http://registry.npmjs.org/git-commander/-/git-commander-0.0.14.tgz"
},
"_resolved": "https://registry.npmjs.org/git-commander/-/git-commander-0.0.14.tgz"
}
When I switch to a real text-mode TTY, the boundary between panes is moved to the extreme left and all the unstaged files show up in the left part of the screen instead of the right one.
When a branch is not fully merged, branch deletion is impossible within Git Commander.
Consider the following repo:
❯ mkdir git-repo
❯ cd git-repo
❯ git init
Initialized empty Git repository in ~/git-repo/.git/
❯ git checkout -b main
Switched to a new branch 'main'
❯ touch initial-commit
❯ git add --all
❯ git commit -m "Initial commit"
[main (root-commit) 431a8c2] Initial commit
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 initial-commit
❯ git branch
* main
❯ git checkout -b tmp
Switched to a new branch 'tmp'
❯ touch branch-file
❯ git add --all
❯ git commit -m "Branch commit"
[tmp 49ef858] Branch commit
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 branch-file
❯ git checkout main
Switched to branch 'main'
The resultant Git repo looks like this:
* tmp
/
* main
Trying to delete the branch results in an error, because the branch is not yet fully merged:
❯ git branch --delete tmp
error: The branch 'tmp' is not fully merged.
If you are sure you want to delete it, run 'git branch -D tmp'.
❯ git branch
* main
tmp
In order to delete the unmerged branch, one must do a force delete:
❯ git branch --delete --force tmp
Deleted branch tmp (was 49ef858).
❯ git branch
* main
Git Commander does not allow for force deletion of branches. In the event that the user is requesting the deletion of a non-fully merged branch, Git Commander should provide a confirmation dialog stating that the branch is not fully merged. If the user cancels from the dialog, the deletion should do nothing (as it does today), but if the user confirms from the dialog, the deletion attempt should be re-executed forcefully (i.e. with the --force
flag).
For commit and fixing conflict
For git model
Inspired by Sublime Text's GitSavvy. Certain patterns and filenames can be explicitly added to .gitignore from within the UI.
It takes a lot of time to start and moving cursor along the unstaged files is slow as h*ll.
C-c is SIGKILL. So, it's better to change shortcuts.
Need to gather some idea. Like Vi? or Emacs? or something.
I am on windows and on install I get the following error:
npm WARN engine [email protected]: wanted: {"node":"^0.12"} (current: {"node":"4.2.1","npm":"2.14.7"})
The requirement is suppose to be any node version greater than 0.12. Right?
한글 파일명에 대한 가이드로 사용 전에 git 설정을
git config --global core.quotepath false
가 필요하다는 점.
nodejs 0.12 이상 버전이 필요하다는 점이 명시 되었으면 좋겠습니다
I'm closing the commit editor when I type "q" ..
It's an easy fix tho.
I did a hotfix for it, if you are interested.. I might not be the "correct" way of doing it, I just check if the entered key is q when I'm inside the editor view.
view.textarea.key(config.keys.common.quit, function(ch, key) {
if (key.full === 'q') return;
editor.hide();
});
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.