diff --git a/README.html b/README.html new file mode 100644 index 0000000..62a0dd8 --- /dev/null +++ b/README.html @@ -0,0 +1,135 @@ + + + + + + +README.html + + + + + + +perl: warning: Setting locale failed. +perl: warning: Please check that your locale settings: + LC_ALL = (unset), + LC_CTYPE = "UTF-8", + LANG = "en_MX.UTF-8" + are supported and installed on your system. +perl: warning: Falling back to the standard locale ("C"). +

GitBaseProject2Research

+ +

This is an example guide repository to develop a research project based on the git control version's philosophy. This example repository could be reproduced for newer repositories as a guidance for related projects.

+ +

A Basic Git Introduction

+ +

First of all try to install the git system for your own OS visiting and following some steps here.

+ +

Git is an open source version control system to handle from small to large projects with speed and efficiency, with collaborative or private options. Git was designed by Linus Torvalds in 2005 for the development of the linux kernel, the system can manage large or small quantity of source code files. But, what is a git repository?

+ +

The git flow process is shown in the next figure.

+ +

The three basic stages areas of git process

+ +

The process shows three basic stages/areas in the git flow:

+ +
    +
  1. The working directory.
  2. +
  3. Staging area.
  4. +
  5. Repository.
  6. +
+ +

However, all the stages/areas are together at the same time, just a command will takes your files from one stage to another, let see a basic example.

+ +

working directory

+ +

First a local git repository or local repo is some kind supervised space in your computer that informs you what files are added, deleted or modified, this space is known as working directory. Thus, the git system first ask you which files would you like to track any change done in the files. This is done using the "git add" command on your OS terminal prompt; a very useful list of commands can be founded in git cheat sheet. In the other hand, for large projects there are some GUI (Graphic User Interface) that can be used like smart git or source tree; my personal recommendation is smartgit.

+ +

This time, as an example smart git screen shots are going to be used, then, if you install a GUI system you will see your working directory like this:

+ +

Working Directory. 1)At left: the repository name, 2)at right: the files.

+ +

then, you can see the file's status. In the example you are seeing untracked and modified files. Untracked means that there are new files and they are not supervised by the git system. While the modified ones, are files already supervised by git, and have been changed. Also you will find other status options like rename and deleted, meaning of course that those files have been renamed or deleted at the working directory.

+ +

If you are using a command based git system, you can check the status of your working directory with the git status command:

+ +

console +Dir marx$ git status + +here we are considering that we are at the Dir directory. The answer of the system will be something like this:

+ +

```console +On branch master +Your branch is up to date with 'origin/master'.

+ +

Changes not staged for commit: + (use "git add ..." to update what will be committed) + (use "git checkout -- ..." to discard changes in working directory)

+ +
modified:   README.md
+
+ +

Untracked files: + (use "git add ..." to include in what will be committed)

+ +
introduction.txt
+
+ +

no changes added to commit (use "git add" and/or "git commit -a") +```

+ +

as you can see, the system informs you that there are modified and untracked files.

+ +

After this you are ready to add the new files to the staging area.

+ +

staging area

+ +

To stage a file or group of files is just the preparation to finally make a commit. Suppose you are working on two options, one is ready, and the other needs more work. Then you can stage the part that is ok and commit it. Thus, you need to add the file with the stage button int the GUI based git:

+ +

Stage button.

+ +

You have to repeat this for every file you want to add, or you can select several files at the same time.

+ +

In the command based version, you can add an specific file with the git add command:

+ +

console +Dir marx$ git add Readme.md + +if you need to add all changes of your working directory it is possible by using: + +Dir marx$ git add * +

+ +

Commit

+ +

To be able to finish the commit process must be sure to setting up a name and e-mail address, then if you've never used git before, first you need to set up both. Run the following commands to let git know your name and e-mail address. If you already did it, skip this step.

+ +

console +git config --global user.name "Your Name" +git config --global user.email "your_email@whatever.com" + +after that you also need to be sure of make a simple change on any of the tracking files like the Readme.md file, afterwards you can use the 'git commit' command:

+ +

console +git commit -m "Changes for Readme file" + +If you are following the GUI method, you will see a button like this:

+ +

The commit button

+ +

There is more

+ +

This is just a basic introduction to control the content of a repository, these repositories can be local or also can be remote. Then terms like stage, working copy, fetch, pull, push, branch, merge, stash, tag, and remote repository will be common on the git language. However, this is a simple introduction to the git system, if you want to learn a detailed information and commands visit the git web-page to find e-books, examples and useful information.

+ +

Ideas

+ + + + + diff --git a/README.md b/README.md index 4041450..9f1d14a 100644 --- a/README.md +++ b/README.md @@ -84,11 +84,28 @@ To be able to finish the commit process must be sure to setting up a name and e- git config --global user.name "Your Name" git config --global user.email "your_email@whatever.com" ``` -after that you also need to be sure of make a simple change on any of the tracking files like the `Rea.md` fime Rea able to make the commit about -Then terms like stage, working copy, fetch, pull, push, branch, merge, stash, tag, and remote repository will be common on the git language. However, this is a simple introduction to the git system, if you want to learn a detailed information and commands visit the [git web-page](https://git-scm.com) to find e-books, examples and useful information. +after that you also need to be sure of make a simple change on any of the tracking files like the `Readme.md` file, afterwards you can use the 'git commit' command: + +```console +git commit -m "Changes for Readme file" +``` +If you are following the GUI method, you will see a button like this: + +![The commit button](images/commit1.png) + +after pressing the button you can just add the message that will be related with that version's content, as can be seen on the image you can select what files are going to be commited: +![The message to be commited](images/commit2.png) + +Then, when the commit button has been pressed a new dot will appear in the version line time, in this case after the initial commit: + +![The ](images/commit3.png) + +# There is more # + +This is just a basic introduction to control the content of a repository, this repositories can be local or also can be remote. Then terms like stage, working copy, fetch, pull, push, branch, merge, stash, tag, and remote repository will be common on the git language. However, this is a simple introduction to the git system, if you want to learn a detailed information and commands visit the [git web-page](https://git-scm.com) to find e-books, examples and useful information. -#### Ideas #### +#### Next Ideas to be developed here #### - Branches - Tags - stash diff --git a/images/commit1.png b/images/commit1.png new file mode 100644 index 0000000..eff2b4e Binary files /dev/null and b/images/commit1.png differ diff --git a/images/commit2.png b/images/commit2.png new file mode 100644 index 0000000..73d8f59 Binary files /dev/null and b/images/commit2.png differ diff --git a/images/commit3.png b/images/commit3.png new file mode 100644 index 0000000..1684b20 Binary files /dev/null and b/images/commit3.png differ diff --git a/images/git-fork-clone-flow.png b/images/git-fork-clone-flow.png new file mode 100644 index 0000000..3046ad0 Binary files /dev/null and b/images/git-fork-clone-flow.png differ diff --git a/images/git_cheat_sheet.pdf b/images/git_cheat_sheet.pdf new file mode 100644 index 0000000..fde3518 Binary files /dev/null and b/images/git_cheat_sheet.pdf differ diff --git a/images/naws3.png b/images/naws3.png new file mode 100644 index 0000000..d9a2433 Binary files /dev/null and b/images/naws3.png differ diff --git a/images/stage.png b/images/stage.png new file mode 100644 index 0000000..32834d8 Binary files /dev/null and b/images/stage.png differ diff --git a/images/workingDirectory.jpeg b/images/workingDirectory.jpeg new file mode 100644 index 0000000..630b2c2 Binary files /dev/null and b/images/workingDirectory.jpeg differ