![]() ![]() to i n c l u d e in what w i l l be committed ) # tata. 2.3 Browse a repository Files changed in working directory To know the list of modified files, deleted ones or created ones, you can use the following command : s t a t u s For example, if you added two files toto.txt and tata.txt, the git status output will be : # On branch master # Untracked f i l e s : # ( use add. For XLiFE , you can go to the sources tab on the forge website. To do so, you will use the following command : c l o n e Now, the distant repository is your remote called origin, namely the repository with whom you are connected. 3ĥ 2.2.2 Clone a distant repository When you clone a distant repository, you create a repository connected to the distant one, getting all tracked files, the history of commits and everything you need to work in the project. This option is very useful when you want to have a main repository to which every project member is synchronized and you want to spare memory. There is a useful option you may use, bare, in order to create a bare repository, which consist of just the GIT DIR. The GIT DIR contains your config for the project and in a zipped way, the list of commits and tracked files. com smtpserverport = 587 smtppass = smtpencryption = s s l 2.2 Create a repository Create an empty repository To create an empty git repository, you may go to the root directory of your project and use the following command : i n i t This create what is called the GIT DIR, namely a directory named.git in your root directory. e m a i l \smtpserver = smtppass = smtpserverport = 465smtpencryption = Example with Gmail Here is the /.gitconfig for a gmail address : name = Your Name e m a i l = \smtpserver = gmail. The previous commands edit this file and the result is : name = Your Name e m a i l = your. smtppass With file edition There is another way to define those global parameters, namely define directly the /.gitconfig file. smtpencryption t l s c o n f i g g l o b a l send. smtpserverport 465 c o n f i g g l o b a l send. com If you have to use patches management by, you also will have to define some information about your address. name Your Name c o n f i g g l o b a l user. are also available on the Git website : Contents 1 The Git Cheat Sheet 2 2 Useful git commands for XLiFE Configuring git With commands With file edition Example with Gmail Create a repository Create an empty repository Clone a distant repository Browse a repository Files changed in working directory Changes to tracked files Who changed what in a file? Manage branches Create another branch Display all branches names Switch to another branch Delete a branch Merge a branch in the current one Update a repository Pull latest changes from distant repository Apply a patch that someone sent you Publish in a repository Commit all changes Push changes to origin Manage patches Reverting a repository Fix the last commit Undo changes since the last commit Undo commits Git GUIs The Git GUI on Unix systems TortoiseGit on Windows GitX on MacĤ 2 Useful git commands for XLiFE Configuring git With commands When you use git for the first time, you have to configure some information about your name, your c o n f i g g l o b a l user. ![]() For example, if you want help for the git init command, you will type : git help init. ![]() To learn more about a specific command, you may use : help If you want to get help for a specific command, you may give it after the help keyword. For each command, only a few options will be explained. 1 Using git in XLiFE Nicolas Kielbasiewicz May 15, 2014Ģ The aim of this document is to explain the main useful features and commands of the scm called git.
0 Comments
Leave a Reply. |