

Info 1: Staging does not save your files Keep these two essential pieces of info in mind whenever you stage files in Git. Important Stuff to Know about Staging in Git However, to prevent unexpected results, it is best to avoid using it. Technically, you can use the git add * command also to stage multiple files. There must be a space between the add command and the dot mark.The dot is essential in the add command above.As such, the above command will stage all modified, and untracked files only of that project's directory wherein the git add. A dot symbol means "current directory".In other words, a committed file is a file in which you have recorded its staged version into the. Committed state įiles in the committed state are files successfully stored into the. Once you stage a file, it implies that you have explicitly authorized Git to monitor that file's version. git repository during the next commit snapshot. Staged state Ī staged file is a modified file you have selected in its current state (version) in preparation for being saved (committed) into the. In other words, files in the modified state are files you have modified but have not explicitly instructed Git to monitor. Modified state Ī file in the modified state is a revised-but uncommitted (unrecorded)-file. The three primary states (conditions) a file can be in are: modified, staged, or committed. git-is a hidden folder wherein Git stores all recorded versions of your project's file(s). The Git local repository-automatically named.Moreover, regardless of the type of remote repository, all the standard push, pull, fetch operations are still applicable. git directory duplicated to a location "elsewhere" on your local system is still a remote repository. The term "remote" means "elsewhere"- not "online".It is also not a Central Version Control System (CVCS) that stores all its versioned files centrally on a single server. Git is not a Local Version Control System (LVCS) that saves file changes in a unique format on a local hard disk- without any collaborative support. Thus, the importance of a reliable and collaborative version control system like Git. Moreover, tracking what changed, who changed it, and why it got changed is a tedious endeavor. However, this approach is error-prone and ineffective for team projects. Intuitively, many people already version control their projects by renaming different versions of the same file in various ways like blogScript.js, blogScript_v2.js, blogScript_v3.js, blogScript_final.js, blogScript_definite_final.js, and so on. What Is a Version Control System? Ī Version Control System (VCS) refers to the specific technique employed to save a file's versions for future references. You can learn more about the differences between the two technologies in the Git vs. Git is a version control system, while GitHub is a version control hosting service for hosting.
