Is it possible to commit an object directly from memory to a repository, or do you always have to write memory to a file, only to have git reload the file to memory?
The interactive rebase tool is a great way to help you clean up Git commits and branches. When the rebase commits, a successful Git cleanup of the develop branch's commits occurs and squashes them all into one. The new Git commit created in the process is given the name E'.
If this is your last commit and you want to completely delete the file from your local and the remote repository, you can: remove the file git rm <file> commit with amend flag: git commit --amend.
Without adding any files, the command git commit won't work. Git only looks to the staging area to find out what to commit. Staging, or adding, files, is possible through the command line, and also possible with most Git interfaces like GitHub Desktop by selecting the lines or files that you'd like to stage.
No, you don’t need to write to disk first. You can create blobs from memory, by passing the data to git hash-object -w --stdin
. You can add those directly to the index or built trees with them and commit directly. Some details can be found here: http://git-scm.com/book/en/Git-Internals-Git-Objects
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With