-
Notifications
You must be signed in to change notification settings - Fork 0
/
update-repo.sh
85 lines (67 loc) · 1.68 KB
/
update-repo.sh
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
#!/bin/sh
###############################################################################
#
# This file is part of canu, a software program that assembles whole-genome
# sequencing reads into contigs.
#
# This software is based on:
# 'Celera Assembler' r4587 (http://wgs-assembler.sourceforge.net)
# the 'kmer package' r1994 (http://kmer.sourceforge.net)
#
# Except as indicated otherwise, this is a 'United States Government Work',
# and is released in the public domain.
#
# File 'README.licenses' in the root directory of this distribution
# contains full conditions and disclaimers.
##
#
# Given a path to a git repo, run a bunch of git commands to update it to
# the latest remote master, and log what has changed.
#
# If the repo is on a branch, the repo will be switched over to master.
#
cd $1
echo "########################################"
echo "#"
echo "# INITIAL STATUS"
echo "#"
git status
echo ""
echo "########################################"
echo "#"
echo "# REVERT TO PREVIOUS LATEST MASTER"
echo "#"
git checkout master
#git log --numstat ..origin/master
git merge
echo ""
echo "########################################"
echo "#"
echo "# STATUS BEFORE UPDATING"
echo "#"
git status
echo ""
echo "########################################"
echo "#"
echo "# FETCH NEW BITS"
echo "#"
git fetch
echo ""
echo "########################################"
echo "#"
echo "# LOG OF NEW BITS"
echo "#"
git log --numstat ..origin/master
echo ""
echo "########################################"
echo "#"
echo "# MERGE NEW BITS"
echo "#"
git merge
echo ""
echo "########################################"
echo "#"
echo "# FINAL STATUS"
echo "#"
git status
exit 0