-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexec01.sh
More file actions
23 lines (18 loc) · 881 Bytes
/
Copy pathexec01.sh
File metadata and controls
23 lines (18 loc) · 881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
#mkdir temp
# Clone just the repository's .git folder (excluding files as they are already in
# `existing-dir`) into an empty temporary directory
git clone --no-checkout https://github.com/dragon-analytics/quality-of-life-analysis.git mediapy/notebooks/notebook.tmp # might want --no-hardlinks for cloning local repo
# Move the .git folder to the directory with the files.
# This makes `existing-dir` a git repo.
mv mediapy/notebooks/notebook.tmp/.git mediapy/notebooks/
# Delete the temporary directory
rmdir mediapy/notebooks/notebook.tmp
cd mediapy/notebooks
# git thinks all files are deleted, this reverts the state of the repo to HEAD.
# WARNING: any local changes to the files will be lost.
git reset --hard HEAD
#mkdir /temp
#git clone https://github.com/dragon-analytics/quality-of-life-analysis.git temp;
#mv -r temp/* mediapy/notebooks/
#rm -rf temp