GitHub may be free (for now), but it’s not infinite . This is why we don’t want to include them in our repo: they’re unnecessary space wasters. Ignored files are usually OS-specific files - that is, stuff your computer needs to render your project but that has nothing to do with your actual project. Ignored - a file which Git has been explicitly told to ignore.Untracked - a file not yet staged or committed.Tracked - a file that has already been staged and/or committed.Git sees every file in your working directory as one of three things: How this works harkens back to Git’s distributed graph theory tree model. Basically, it’s a list of files you want Git to, well, ignore. gitignore file names intentionally untracked files in order to tell git “Hey, don’t include these!” in its versioning work. There is another hidden file in your repo, also automatically generated when we run $git init, called. Gitignore It!Īnd I don’t just mean ignore the contents of. git, the folder, holds pretty much everything that makes Git, the versioning control software, do what we want it to do, and messing around with its contents can seriously wreck your project. Git makes this invisible on purpose: there is lots of important stuff inside, most of it beyond the ken of mere mortals and average devs. This is a handy ability, but otherwise, you will do best to leave. git is as a check to make sure the working directory is indeed a Git repository. Really the only reason we would want to even expose. git subdirectory, much less gone digging around in there yet, don’t fret. This renders it functionally invisible, in both finder and terminal, unless we use a command to specifically expose it (Hint: $ls -a). Note the dot in front of the “.git” folder. This sub-folder contains all the stuff that Git generates to track and store each file’s revision history. git subdirectory in your current working directory, i.e., the project’s root. ![]() Executing $git init generates a brand new master branch upon which you commence building your brand new project. If you recall from our very first tutorial in this series, Git for Absolutely Everybody, $git init is the one-time command used for the creation and initial setup of a new repo.
0 Comments
Leave a Reply. |