![]() Among the files that we have changed, we select the ones that we need, and these classes are changed to the "staged" status.When we make changes to files that have already been added to the Git repository, then their status is "modified".A file that is created but not yet added to the repository has the "untracked" status.How should you understand this?These are statuses that apply to the files containing our code: Statuses in GitGit has several statues that need to be understood and remembered: Git config user.email bit of theory.To dive into the topic, we should introduce you to a few new words and actions. Git config -global user.email you need to change the author for a specific project, you can remove "-global". Git config -global user.name "Ivan Ivanov" Set up a username and password for all your projects by running the following commands: This makes sense and is necessary, because Git takes this information for the Author field when a commit is created. Git settingsGit has user settings for the user who will submit work. If Xcode is installed, then Git will definitely be automatically installed. If you don't have it, then the easiest way to get it is to download the latest version here. Installing on macOSHere, too, you first need to check whether Git is already there. I'm working on Ubuntu, so I can tell you what to write for it: sudo apt-get install git. Open a terminal and install Git on Ubuntu. ![]() If you get an intelligible answer, then nothing needs to be installed. To check, you need to open a terminal and write: git -version. To avoid having to go to the folder with the project every time in order to open Git there, you can open the command prompt in the project folder with the right mouse button with the path we need: Installing on LinuxUsually Git is part of Linux distributions and is already installed, since it is a tool that was originally written for Linux kernel development. Here's how it looks in the Start Menu: Now this is a command prompt you can work with. To do this, we will use the bash console provided by Windows. Everything is simple here: click on the first Google link, perform the install, and that's it. Installing on WindowsAs usual, you need to download and run an exe file. Installing GitLet's install Java on your computer. This is especially important when you are investigating what changed in the context of a single task, making it possible to revert the changes. That is, we need to be able to see step-by-step which files have changed and how. It is needed to track changes that occur over time. Why do we need it? Distributed teams need some kind of system for managing their work. Git basicsGit is a distributed version control system for our code. You need to know a set of commands that will help you understand everything that is happening. But the beauty is that you don't have to keep all the Git commands and features in your head in order to be continuously employed. You have nothing to do with programming if you don't know/understand Git. Today we're going to talk about a version control system, namely Git.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |