Git is free and open-source software shared under the GPL-2.0-only license. ![]() As with most other distributed version control systems, and unlike most client–server systems, every Git directory on every computer is a full-fledged repository with complete history and full version-tracking abilities, independent of network access or a central server. Since 2005, Junio Hamano has been the core maintainer. Git was originally authored by Linus Torvalds in 2005 for development of the Linux kernel, with other kernel developers contributing to its initial development. Its goals include speed, data integrity, and support for distributed, non-linear workflows (thousands of parallel branches running on different computers). Git ( / ɡ ɪ t/) is a distributed version control system that tracks changes in any set of computer files, usually used for coordinating work among programmers who are collaboratively developing source code during software development. POSIX ( Linux, macOS, Solaris, AIX), Windows Primarily in C, with GUI and programming scripts written in Shell script, Perl, Tcl and Python We then add to the runCode method to get this new information logged: public async runCode(stashSha: string, parentDiffs: NodeGit. Public fileStatus: | undefinedĪnd then we pull out the diffs between the stash item and its parent(s): public class GetStashFiles ` * Create a class to hold the file information returned */ So first of all we create a class for file information, and do imports: import * as NodeGit from 'nodegit' The solution involves using NodeGit to pull out this information from your local Git repository. In the meantime, you won't be able to see them. The only problem is ever seeing those files again, at least until you pop or apply the stash. ![]() Its just that you won't be able to see any ignored or untracked files that were added to the stash.īy default, the CLI call that you may have made won't add those sorts of files you can add them using flags such as this to include the untracked files: git stash push -include-untrackedĪnd this to include the untracked and the ignored files: git stash push -all You may well be able to find all the files that were added, modified or deleted before you stashed them. ![]() So does the otherwise estimable Tortoise Git. Both Git CMD and Git Bash fail to provide a complete picture of what's going on. ![]() Whilst the command line (CLI) may provide ways to get this data, it isn't complete. Getting information out of Git Stash about individual files within it isn't as easy as you might imagine. Showing Added, Modified and Deleted Files We also have more general overview information about git stash. Git simply doesn't give you all the information you might want easily, such as how do you see the ignored and untracked files in a Stash item? Well, here's a method using NodeGit and TypeScript. Its just that sometimes, its less powerful in the 'Dark Side of the Moon' sense, and more powerful in the 'four year old with a loaded hand gun' sense. Git is a powerful and impressive version control system. But you can see these files using NodeGit. Both 'untracked' and 'ignored' files are hidden when you look at the Git stash, and you could destroy important files when applying that stash item without even realising it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |