![]() ![]() It is possible to have other branches of development but we will skip that for now. The master branch is considered the main line of development. Notice that the first line says On branch master. ![]() Nothing to commit (working directory clean) It should say something like ~/myproject% git status ~/myproject% git commit -m "Initial code for plotting histogram"Ĭreated initial commit 7425153: Initial code for plotting histogramġ files changed, 2 insertions(+), 0 deletions(-)Īfter committing the change you can run git status. Make sure you write something informative (but concise) or else you won’t have any idea what you did when you look at it later. If you do not use this switch git will open an editor session for you to enter a message. The git commit command requires that you provide a short message about what the changes are and this can be done using the -m switch. Now that you have added your new code file you can commit the change using git commit. Now code.R is listed under Changes to be committed and is considered a new file. Running git status again after this command produces ~/myproject% git status This can be done using git add code.R: ~/myproject% git add code.R This is because you need to tell Git that you want to track the changes in this file. Notice that the code.R file is listed under Untracked files. Nothing added to commit but untracked files present (use "git add" to track) For example, let’s create a file named code.R containing some R code. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |