-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathSETUP
More file actions
115 lines (83 loc) · 2.29 KB
/
SETUP
File metadata and controls
115 lines (83 loc) · 2.29 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
Git global setup
--
git config --global user.name "Username"
git config --global user.email "Username@uni-bielefeld.de"
Cloning an existing repository to a local folder:
git clone https://github.com:FLAME-HPC/PANDEMACE.git
Adding a README file:
touch README
git add README
git commit -m "add README file"
git push -u origin master
Creating a new branch in a remote repository:
mkdir new
cd new
git init
git remote add origin git@github.com:FLAME-HPC/PANDEMACE.git
git fetch origin master
git checkout -b master
#resolve mere conflicts by hand (use editor)
git merge FETCH_HEAD
To push use:
git push -u origin master
Pushing files to an existing Git repository:
#go into folder
cd existing_folder
git init
git remote add origin git@github.com:FLAME-HPC/PANDEMACE.git
#fetch
git fetch origin [branch name]
git checkout -b [branch name]
git merge FETCH_HEAD
#add
git add new_files
git commit -m "commit message"
#publish
git push -u origin master
#Branching
git branch [branch] #create a branch
git checkout [branch] #switch to branch
git checkout -b [branch] #create and switch to branch one one go
... work...
git checkout master #switch back to master branch
git merge [branch name] #merge changes from branch into master
# Creating a new branch
git checkout -b [branch]
# Checkout out a pre-existing branch
git init
git checkout -B remotes/origin/[branch]
# Edit the file .git/config
[remote "origin"]
url = git@github.com:FLAME-HPC/PANDEMACE.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[branch "ADD_BRANCH_NAME"]
remote = origin
merge = refs/heads/ADD_BRANCH_NAME
# Pull from remote
git pull origin [branch]
# List remote
git remote -v
# Add upstream
git remote add <name> <url>
# For this repo
git remote add upstream https://github.com/FLAME-HPC/PANDEMACE.git
HOWTO USE GIT Large File Support
=================================
1. For Win/Mac users: install GitHub Desktop
2. Go to a Git project folder
# cd git_project
3. Activate LFS support for this project
# git lfs install
4. Specify which large files to track
# git lfs track "*.pdf"
5. Add the large files
# git add *.pdf
6. Commit
# git commit -am "large files added"
7. Push
# git push
8. Pull
# git pull