-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path06_01_collaborating.txt
executable file
·44 lines (35 loc) · 1.35 KB
/
06_01_collaborating.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
#========================================================================
# EPISODE - COLLABORATING WITH A REMOTE REPOSITORY
# SECTION - PULLING CHANGES FROM A REMOTE REPOSITORY
#========================================================================
# PULLING CHANGES FROM A REMOTE REPOSITORY
# Now when we have a remote repository, we can share it and collaborate
# with others (and we can also work from multiple locations: for example
# from a laptop and a desktop in the lab).
#
# But how do we get the latest changes?
# Git allows us to get the latest changes
# down from a repository.
# We’ll first do a “dry run” of pulling changes from a remote repository
# and then we’ll work in pairs for some real-life practice.
# First, let us leave our current local repository,
cd ..
ls
# And let us clone our repository again, but this time specify the
# local directory name,
git clone https://github.com/kkh451/paper.git laptop_paper
ls
# Let’s pretend these clones are on two separate machines!
# So let’s go into one of our clones, add a figures section,
# commit the file and push these changes to GitHub:
# Switch to the 'paper' directory
cd paper
# ** FILE EDITS **
# Add figures section to paper.md
#
# # Figures
# Figures go in their own section in a draft paper.
#
git add paper.md
git commit -m "Add figures"
git push