-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgit_guide.txt
42 lines (32 loc) · 1.14 KB
/
git_guide.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Working with git in this project
=== The idea is that when you have a task to do you ===
1. Create a new git branch
2. Finish your task in your git branch
3. Combine (merge) your branch into the original (develop) branch
=== To do this ===
1. Clone down the project
for example:
# git clone [email protected]:hydrology-tep/fanfar-forecast.git
# cd fanfar-forecast
# git checkout develop
2. Ensure you have the latest code
# git pull
3. Create a new branch, note the -b
git checkout -b my-task
4. Do your work until its done
Coding...
4. Commit your work
git add ./path_to_my_changed_file ./path_to_my_changed_file2
git commit -m "Comment about your work"
git push
5. Go to the project webpage and create a merge request from your branch into the original branch
# example at https://github.com/hydrology-tep/fanfar-forecast/commits/develop
6. You or someone else now accepts the merge request on the webpage
===== Tips ====
* Everyday before you start working run
git pull
* If you run into problems
1. Copy the files you want to keep into a separate directory
2. Delete the entire project folder
3. Clone down the project again
4. git checkout my_branch