-
Notifications
You must be signed in to change notification settings - Fork 5
/
test.sh
executable file
·58 lines (50 loc) · 1.91 KB
/
test.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
# Change this to your repository url
[email protected]:serebrov/test-git-clone.git
BITBUCKET_URL_HTTP=https://[email protected]/serebrov/test-git-clone.git
SCRIPT_PATH=`dirname $0`
cd $SCRIPT_PATH
rm -rf $SCRIPT_PATH/project
rm -rf $SCRIPT_PATH/mycopy
# git clone git://git.kernel.org/pub/scm/git/git.git
# git checkout v1.9.4
# make configure
# ./configure --prefix=/usr
# make all
# ./git --version
# # git version 1.9.4
# GIT194=./git/git
GIT194=git
$GIT194 --version
$GIT194 clone $BITBUCKET_URL_HTTP project
# Cloning into 'project'...
# Warning: Permanently added the RSA host key for IP address 'xxx.xxx.xxx.xxx' to the list of known hosts.
# remote: Counting objects: 163, done.
# remote: Compressing objects: 100% (154/154), done.
# remote: Total 163 (delta 53), reused 0 (delta 0)
# Receiving objects: 100% (163/163), 3.62 MiB | 1.30 MiB/s, done.
# Resolving deltas: 100% (53/53), done.
# Checking connectivity... done.
mkdir mycopy
cd mycopy
git clone ../project .
# Cloning into '.'...
# done.
ls
# application.py database.py README.md requirements.txt static
git remote -v show
# origin /home/seb/test/gitdist/mycopy/../project (fetch)
# origin /home/seb/test/gitdist/mycopy/../project (push)
git remote rename origin local
git remote add origin $BITBUCKET_URL
git remote -v show
# local /home/seb/test/gitdist/mycopy/../project (fetch)
# local /home/seb/test/gitdist/mycopy/../project (push)
# origin [email protected]:owner/project.git (fetch)
# origin [email protected]:owner/project.git (push)
git pull origin
# Warning: Permanently added the RSA host key for IP address 'xxx.xxx.xxx.xxx' to the list of known hosts.
# From bitbucket.org:owner/project
# * [new branch] master -> origin/master
# You asked to pull from the remote 'origin', but did not specify
# a branch. Because this is not the default configured remote
# for your current branch, you must specify a branch on the command line.