3 ms·
You find it hard to create a list? Here's an example of making a staging file: echo file1 > staging # e.g. git add file1 echo di
by toomim 10y ago
You find it hard to create a list? Here's an example of making a staging file:
echo file1 > staging # e.g. git add file1
echo dir2/file2 >> staging # e.g. git add dir2/file2
echo dir3/file1 >> staging
echo dir3/file5 >> staging
echo dir4/dir9/dir394/file384 >> staging
And committing the file:
eval "$(echo gl commit -o `cat staging`)" # e.g. git commit
- to3m 10y agoDude.
- jdmichal 10y agoCongrats. You just recreated a bad implementation of the staging area in a text file.
- toomim 10y agoCongrats, you got the joke! ;) A staging area is just a list of things to commit. There are many ways to make lists. I personally use emacs because direct manipulation rocks. Complaining about a change in one way to make lists is silly—gitless introduces much more powerful basic mechanisms like uncommitted branching, and lists belong on top of these more powerful basic features; not underneath like in the traditional porcelain.
- qznc 10y agoThe staging area is finer than files. It is more like a diff, where you can change parts of a file. For example, I usually use git-add -p to put my changes in staging without the debug print statements. I still want to keep them in my working copy.
- AlexCoventry 10y agoIs there a handy way to stage the current changes, then make further unstaged changes prior to the commit?
- toomim 10y agoYes, by making a branch. Gitless allows you to branch and have unstaged, uncommitted changes on different branches. This extra power in branching is useful.