Commit 31be4bae authored by omar.bashir's avatar omar.bashir

ReadMe.md descripe the Git-lesson

parent ffeb288b
this is thes test project
This is a test project
to run the code
1- clean and debug
2- run this command docker_>>>>
1. clean and debug
2. run this command docker_>>>>
#### *These lines were written by **Mohamad Omar Bashir***
#### *Please feel free to correct it as needed.* :)
to learn more about [MarkDown syntax click here](https://github.com/luong-komorebi/Markdown-Tutorial/blob/master/README.md)
</br>
# Git
Source version control system using **GUI** or Commands: from *"cmd"* , *"power shell"* , *"git bash"* ....
* [Download git sdk](https://git-scm.com/downloads) from internet
* Make a file named **.gitignore** at the *projet location*.
This file will contain all **ignored** *files* and *directorys*. it must looks like this:
packages
Queries/bin
Queries/obj
*.suo
**Main-operations:**
================
* just for the first time type:
> \$ git init
This will Create an empty Git repository or
reinitialize an existing one
### **downloading the project**
1. type:
>\$ git clone https\:\/\/git-project-url
This will Clone a repository into a new directory
2. if the project was not fully downloaded type:
>\$ cd project-directory-name
>\$ git pull origin master
This will download the project files from the master branch.
### **Uploading the changed_files**
1. Check the changed files :
> $ git status
2. Add the file(s) contents to the index (prepare to upload)
> $ git add .
Where "." is a ***path*** ,this will add the current-directory contents
> $ git add path
To add one file use:
> $ git add file-name
3. Make sure to get the project ***other-members-latest-update***:
> $ git pull origin master
4. record changes to repository (stageing):
> $ git commit -m "My-Message here"
5. **upload** the files into the server:
> $ git push origin master
6. check if the uploaded files are up-to-date by downloading it again:
> $ git pull origin master
### **creating a new branch**
It's preferd not to upload to the master branch before cheking changes, so try to make :
1. a branch for devloping the code,
2. a branch for stageing the changes,
3. and a branch for production
if all changes checked and tested, the admin can merge the changes to the **master** branch.
To create a new branch named "fetcher-Auther" type:
> $ git checkout -b fetcher-Auther
Then we upload the changes as usual:
> $ git pull origin master
> $ git commit -m "This Omar's Auther changes"
> $ git push origin fetcher-Auther
> $ git pull origin master
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment