Skip to content

Commit a4bb06b

Browse files
committed
add clarification about internet dependency for git(hub)
1 parent 3a59f6b commit a4bb06b

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: "Working with Git without internet connection"
3+
author: "Stijn Van Hoey"
4+
date: "March 29, 2017"
5+
output: html_document
6+
---
7+
8+
When working off line, two Git tasks cannot be performed: fetching/pulling updates from the server, and pushing changes to the server. All other commands still work.
9+
10+
One can commit changes, branch off, revert and reset changes, the same as when there exists an internet connection.
11+
12+
### Example workflow:
13+
14+
**start offline mode**
15+
16+
```
17+
while(notBored):
18+
commit changes
19+
add files
20+
branch off new features
21+
```
22+
23+
**end offline mode**
24+
25+
26+
*update master branch*
27+
28+
```
29+
git fetch origin
30+
```
31+
32+
*push changes to the server*
33+
34+
```
35+
git push <branch-name>
36+
```
37+
38+
*it is possible, that during your down-time, a pull request got accepted
39+
in that case, perform the following steps*
40+
41+
```
42+
git fetch origin
43+
git checkout <branch-name>
44+
git rebase master
45+
```
46+
47+
*when necessary: solve merge conflicts, and rebase again.*
48+
49+
*Your feature branch can now be pushed to the server, and a pull request can be made*
50+

0 commit comments

Comments
 (0)