jwu910 / check-it-out Goto Github PK
View Code? Open in Web Editor NEWA command line interface for Git Checkout. See branches available for checkout.
Home Page: https://jwu910.github.io/check-it-out/
License: MIT License
A command line interface for Git Checkout. See branches available for checkout.
Home Page: https://jwu910.github.io/check-it-out/
License: MIT License
This is especially helpful when there are tons of branches and you don't want to have to scroll through the whole list to find the ones that you most commonly use
Possibly generate a local text file storing output of git for-each-ref
Need to access local git information w/o fetching
Need to brainstorm.
When a user attempts to use check-it-out while not connected to the internet, the utility command to build the branch lists will not work. A possible solution has not been found yet.
The app hangs in a blank state if the cwd is not a git repository.
Can simply check if the currentBranch() method returns a valid response or not.
Program should throw an error and print the correct error message for the user
git rev-parse --is-inside-work-tree
will return true if path is inside a git repo. otherwise it will go to stderr
If branch is not on local, but exists on origin, git checkout
should be called without the remote param.
e.g.: git checkout test-branch
instead of git checkout origin/test-branch
Known issue: if the use of the list-table covers the entire terminal window, wider terminal windows will create unwanted space between columns (Haven't figured out a solution to this yet)
Add jack-cli as a dependency and invoke jack on spacebar.
This would give user ability to quickly view a log as well as quickly check commits
App window sizes should be responsive to terminal window size.
Descriptions and readme should be more descriptive.
Change
{
width: '70%'
// to
width: 'shrink'
}
Branches that are grouped inside of a remote get mis-labeled as having their group be the remote
e.g
remote: origin
branch: hotfix/fix-print-out
since hotfix is a grouping, it would show up as origin/hotfix/fix-print-out
; therefore all "hotfix" branches get marked as having hotfix for a remote
I'm guessing these lines (or close to it) are the culprits
Lines 53 to 55 in 0b3a1b1
Reconsider data structure to be more descriptive with branch names. If a user has multiple remotes with few branches, you can easily see three masters right next to each other.
If current branch is a detached HEAD, attempting to change to another detached HEAD will not work.
Need to fix typos in the readme and contributing guidelines.
Using await someAsyncFunction().then(//do something)
Should we be using try catch here and then continuing?
Blessed element creation is messy and hard to read.
Should include a hotkey to show/hide help page.
?
should toggle the help window.
Branches should be grouped by remotes and sorted into tabs.
h/l, left/right
should switch between tabs
l
currently selects, and should be unset first.
Tabs should be listed above headers and highlight current remote.
If user has unstaged changes, app should prompt user to stash changes prior to checking out.
Node 7 is currently required due to the use of async await
functions.
Looking to add Node 6 and compatibility and maybe older versions in the future as well.
If this project is required to build before deployment, we may have to move that route which would require some reorganization.
We should set up a github pages hosted site to give some more visual flair to the readme.
Lines 116 to 121 in 0b3a1b1
{
function: function
}
// can be
{
function
}
Path column could provide different data. Seems unnecessary to list ref path now...
Maybe list last commit?
Need find and implement a testing suite to test utility functions.
I have used Jest for web app projects, but not for CLI tools.
Introduced with refresh hotkey
https://github.com/Yomguithereal/react-blessed
It just makes sense...
When checking out a branch that exists on a remote, but not user's local, the following error occurs:
[LOG] fatal: Unable to create '/home/joshua/programming/check-it-out/.git/index.lock': File exists.
Suspecting that Git is trying to execute another command before the first command has completed. This would most likely be an incorrect use of Promises with the async and await keywords in the Git utilities.
Should hotkey help information always be shown?
Add current remote tracker/tabs
Program should handle attempt to check out currently checked out branch
OS: Arch Linux
Term: Gnome Terminal
Warning window briefly displays "Terminfo parse error"
Move objects into components:
Screen
Table
Questions
Status bar
etc.?
Program should prompt user about unstaged changes and provide options
Need to compartmentalize blessed screen and window objects.
Currently, code is confusing to read. Entry point should be very minimal, only instantiating the main screen.
Can probably skip the fetch on start up to help save startup time. Maybe revert the auto-fetch so it just fetches on "refresh".
Add a column that prints what the remote url resolves to.
Branch could indicate branches that are on a user's local repo, but NOT on any remote.
Currently does not work with windows.
Some research has explained that this needs to be a portable node app. Reasons the node app probably does not work is the difference in file system paths and how '/' does not resolve on windows systems.
Use path.resolve()
as a start.
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.