我在github上放了很多demo项目,多了感觉很乱,想将所有项目归并到一个项目demos下,同时保留原有项目的操作历史。
比如我想将git@github.com:itlgl/demo_bluetoothpan.git
项目归并到demos
下,操作步骤:
git remote add -f demo_bluetoothpan git@github.com:itlgl/demo_bluetoothpan.git
git merge demo_bluetoothpan/master --allow-unrelated-histories
- 在demos目录下,使用指令1将demo_bluetoothpan添加为remote server,并fetch下来。
- 但是这时项目并没有直接显示在demos文件夹下,需要使用指令2将历史记录合并到demos中,此时demo_bluetoothpan项目的文件直接显示在了demos目录下
- 为了方便查看,在demos下新建目录demo_bluetoothpan,并将项目文件移动到demo_bluetoothpan目录下
- 提交更改到github即可
附操作log:
ligl01@LIGL01 MINGW64 /d/github/demos (master)
$ git remote add -f demo_bluetoothpan git@github.com:itlgl/demo_bluetoothpan.git
Updating demo_bluetoothpan
warning: no common commits
remote: Enumerating objects: 87, done.
remote: Counting objects: 100% (87/87), done.
remote: Compressing objects: 100% (66/66), done.
remote: Total 87 (delta 2), reused 87 (delta 2), pack-reused 0
Unpacking objects: 100% (87/87), done.
From github.com:itlgl/demo_bluetoothpan
* [new branch] master -> demo_bluetoothpan/master
ligl01@LIGL01 MINGW64 /d/github/demos (master)
$ git remote
TestSendApduToSIMByTelephonyManager
demo_ble_peripheral
demo_bluetoothpan
origin
ligl01@LIGL01 MINGW64 /d/github/demos (master)
$ git merge demo_bluetoothpan/master --allow-unrelated-histories
Merge made by the 'recursive' strategy.
.gitignore | 8 +
app/.gitignore | 1 +
app/build.gradle | 31 +++
app/proguard-rules.pro | 21 ++
.../demo/bluetoothpan/ExampleInstrumentedTest.java | 26 ++
app/src/main/AndroidManifest.xml | 28 +++
.../com/itlgl/demo/bluetoothpan/BTPanUtils.java | 148 ++++++++++++
.../itlgl/demo/bluetoothpan/BluetoothPanUtils.java | 38 +++
.../com/itlgl/demo/bluetoothpan/ILogCallback.java | 5 +
.../demo/bluetoothpan/IOpenBTPanListener.java | 7 +
.../com/itlgl/demo/bluetoothpan/MainActivity.java | 261 +++++++++++++++++++++
.../demo/bluetoothpan/task/BlueAcceptTask.java | 84 +++++++
.../demo/bluetoothpan/task/BlueConnectTask.java | 50 ++++
.../demo/bluetoothpan/task/BlueReceiveTask.java | 31 +++
.../demo/bluetoothpan/util/BluetoothConnector.java | 199 ++++++++++++++++
.../res/drawable-v24/ic_launcher_foreground.xml | 34 +++
.../main/res/drawable/ic_launcher_background.xml | 170 ++++++++++++++
app/src/main/res/drawable/test_boder_shape.xml | 17 ++
app/src/main/res/layout/activity_main.xml | 122 ++++++++++
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml | 5 +
.../res/mipmap-anydpi-v26/ic_launcher_round.xml | 5 +
app/src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 2963 bytes
app/src/main/res/mipmap-hdpi/ic_launcher_round.png | Bin 0 -> 4905 bytes
app/src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 2060 bytes
app/src/main/res/mipmap-mdpi/ic_launcher_round.png | Bin 0 -> 2783 bytes
app/src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 4490 bytes
.../main/res/mipmap-xhdpi/ic_launcher_round.png | Bin 0 -> 6895 bytes
app/src/main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 6387 bytes
.../main/res/mipmap-xxhdpi/ic_launcher_round.png | Bin 0 -> 10413 bytes
app/src/main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 9128 bytes
.../main/res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 0 -> 15132 bytes
app/src/main/res/values/colors.xml | 6 +
app/src/main/res/values/strings.xml | 3 +
app/src/main/res/values/styles.xml | 17 ++
.../itlgl/demo/bluetoothpan/ExampleUnitTest.java | 17 ++
build.gradle | 27 +++
gradle.properties | 15 ++
gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 54329 bytes
gradle/wrapper/gradle-wrapper.properties | 5 +
gradlew | 172 ++++++++++++++
gradlew.bat | 84 +++++++
readme.md | 19 ++
screenshot/1.png | Bin 0 -> 61396 bytes
screenshot/2.png | Bin 0 -> 55870 bytes
settings.gradle | 1 +
45 files changed, 1657 insertions(+)
create mode 100644 .gitignore
create mode 100644 app/.gitignore
create mode 100644 app/build.gradle
create mode 100644 app/proguard-rules.pro
create mode 100644 app/src/androidTest/java/com/itlgl/demo/bluetoothpan/ExampleInstrumentedTest.java
create mode 100644 app/src/main/AndroidManifest.xml
create mode 100644 app/src/main/java/com/itlgl/demo/bluetoothpan/BTPanUtils.java
create mode 100644 app/src/main/java/com/itlgl/demo/bluetoothpan/BluetoothPanUtils.java
create mode 100644 app/src/main/java/com/itlgl/demo/bluetoothpan/ILogCallback.java
create mode 100644 app/src/main/java/com/itlgl/demo/bluetoothpan/IOpenBTPanListener.java
create mode 100644 app/src/main/java/com/itlgl/demo/bluetoothpan/MainActivity.java
create mode 100644 app/src/main/java/com/itlgl/demo/bluetoothpan/task/BlueAcceptTask.java
create mode 100644 app/src/main/java/com/itlgl/demo/bluetoothpan/task/BlueConnectTask.java
create mode 100644 app/src/main/java/com/itlgl/demo/bluetoothpan/task/BlueReceiveTask.java
create mode 100644 app/src/main/java/com/itlgl/demo/bluetoothpan/util/BluetoothConnector.java
create mode 100644 app/src/main/res/drawable-v24/ic_launcher_foreground.xml
create mode 100644 app/src/main/res/drawable/ic_launcher_background.xml
create mode 100644 app/src/main/res/drawable/test_boder_shape.xml
create mode 100644 app/src/main/res/layout/activity_main.xml
create mode 100644 app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
create mode 100644 app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
create mode 100644 app/src/main/res/mipmap-hdpi/ic_launcher.png
create mode 100644 app/src/main/res/mipmap-hdpi/ic_launcher_round.png
create mode 100644 app/src/main/res/mipmap-mdpi/ic_launcher.png
create mode 100644 app/src/main/res/mipmap-mdpi/ic_launcher_round.png
create mode 100644 app/src/main/res/mipmap-xhdpi/ic_launcher.png
create mode 100644 app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
create mode 100644 app/src/main/res/mipmap-xxhdpi/ic_launcher.png
create mode 100644 app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
create mode 100644 app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
create mode 100644 app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
create mode 100644 app/src/main/res/values/colors.xml
create mode 100644 app/src/main/res/values/strings.xml
create mode 100644 app/src/main/res/values/styles.xml
create mode 100644 app/src/test/java/com/itlgl/demo/bluetoothpan/ExampleUnitTest.java
create mode 100644 build.gradle
create mode 100644 gradle.properties
create mode 100644 gradle/wrapper/gradle-wrapper.jar
create mode 100644 gradle/wrapper/gradle-wrapper.properties
create mode 100644 gradlew
create mode 100644 gradlew.bat
create mode 100644 readme.md
create mode 100644 screenshot/1.png
create mode 100644 screenshot/2.png
create mode 100644 settings.gradle
新建文件夹、移动项目文件、提交操作在GUI中完成的,没有log
文档信息
- 本文作者:itlgl
- 本文链接:https://itlgl.com/note/2018/11/07/issues-29/
- 版权声明:自由转载-非商用-非衍生-保持署名(创意共享3.0许可证)