![]() The first file has already been tracked by Git and was modified.In the diagram below, suppose three files have been created in the working directory. You use the staging index by invoking the git add command, for example: git add You can think of the staging index as a sort of list that tells Git which files (or modifications to files) you want to commit to the repository. Like the working directory, the staging index is a fundamental concept in Git that you must learn and commit to memory. Now you need to let Git know which files to start tracking. Upon initialization, your Git project is officially up and running. Allows you to start running git commands.As you get more advanced in Git, you can use some of the items in this directory to achieve advanced effects, but not yet.This “hidden” directory keeps track of the files and special reference markers needed by the Git program.But what does that mean? Git initialization accomplishes the following: This command initializes Git functionality in your working directory. Initialize Repositoryīefore you begin your work you’ll need to “initialize” Git in your working directory, with this command: git init In the next section, you will find out how to instruct the Git program to start watching this directory for changes. In order to start using your working directory, all you have to do is create a directory and start adding your files to it. This means you must be careful not to accidentally overwrite files in your working directory. For example, you could load previous versions of the project or integrate others’ code from another branch of the project, and your working directory will change. The working directory can be altered by Git. It’s basically the directory (or, folder) that contains the files for your project. As you’re learning more about Git you’ll often hear or read mention of the working directory. ![]() The working directory is the main directory for the project files. Helps to solidify the conceptual framework behind Gitīut if for any reason you choose to use a GUI, there are many popular open source option including:.Allows for scripting and aliasing (to run favorite commands faster).Commands stay the same no matter where you are.There are certain benefits in using the command line version of Git including: In this article, we presume you are interesting in learning the command line variant. When first learning how to use Git, you have a choice between using the command line version and a graphical user interface (GUI) version. Universally supported across various operating systems.Hosted for free on popular websites like GitHub and BitBucket.Decentralized, meaning work can be done independent of a centrally located repository.It is actively developed and supported by a large community of users. Git is (arguably) the world’s most popular version control system. Git Fundamentals and Options (Why Learn Git?) This is a crash course in Git for beginners. This article will introduce the uninitiated beginner to all the immediate Git fundamentals needed to start work right away.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |