-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVLabRepoQuickTips.txt
58 lines (41 loc) · 1.56 KB
/
VLabRepoQuickTips.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Be aware of the wiki in the “Virtual Lab” project (https://vlab.ncep.noaa.gov/redmine/projects/vlab/wiki). It contains lots of good guidance, including sections devoted to:
* Helping Project Owners
* Repository Management (gerrit, git, and SVN)
* Redmine usage
* and even tips for how to use Eclipse IDE
Some basic repo interactions are listed below. Note that anything preceded by a “$” represents a variable.
*** Both gerrit and git ***
local commit:
git add $FILE_NAME
git commit -a (for all) OR
git commit $FILE_NAME(S)
squash:
git rebase -i $BRANCH_NAME~<# of commits to include>
ex: git rebase -i My_Branch~5
change branch:
git checkout $BRANCH_NAME
create new branch (based upon current checked out branch):
git checkout -b $NEW_BRANCH_NAME
commit message keywords:
VLab Issue #NNNN; fixes #NNNN
*** gerrit ***
clone:
git clone gerrit:$REPO_NAME
push to gerrit for review:
git push gerrit:$REPO_NAME HEAD:refs/for/$BRANCH_NAME
(alt): git push $DEFINED_REMOTE
*** git ***
clone:
git clone https://$USER_NAME@vlab.ncep.noaa.gov/git/$REPO_NAME $LOCAL_DIRECTORY
push from local master branch to VLab's master branch:
git push origin master
push from local branch to VLab's remote branch:
git push origin $LOCAL_BRANCH_NAME:$VLAB_REMOTE_BRANCH_NAME
*** svn ***
checkout:
svn co https://vlab.ncep.noaa.gov/svn/$REPO_NAME --username $USER_NAME
commit:
svn commit $FILE_PATH
commit message keywords:
(all followed by #NNNN)
refs, references, fixes, closes