|
2 | 2 | This repository aims to record some frequently-used commands, including Linux and python commands & archive some frequently-used python scripts. |
3 | 3 |
|
4 | 4 |
|
| 5 | +### Create a pull request in the command line |
| 6 | +``` |
| 7 | +git checkout -b new-feature-branch |
| 8 | +git add . |
| 9 | +git commit -m "A descriptive message about your changes" |
| 10 | +git push origin new-feature-branch |
| 11 | +``` |
| 12 | + |
| 13 | + |
| 14 | +### solve push conflicts |
| 15 | + git pull |
| 16 | + |
| 17 | + git config pull.rebase false |
| 18 | + git reset --hard HEAD~1 |
| 19 | + |
| 20 | +### cooperation on GitHub (submodule) |
| 21 | +``` |
| 22 | +1. get the newest update from the original project |
| 23 | +2. push your own codes even without permission |
| 24 | +``` |
| 25 | + |
| 26 | + |
| 27 | +1. fork the desired project. |
| 28 | +2. clone the fork into your local repo |
| 29 | + |
| 30 | + `git clone https://github.com/MitchellX/flash-attention.git` |
| 31 | + |
| 32 | +3. add the original repo as upstream, so that you can pull the newest changes |
| 33 | + |
| 34 | + `git remote add upstream https://github.com/Dao-AILab/flash-attention.git` |
| 35 | +4. see the remote choices |
| 36 | + |
| 37 | + `git remote -v` |
| 38 | +5. get the newest changes |
| 39 | + |
| 40 | + `git pull upstream/main` |
| 41 | + or |
| 42 | + |
| 43 | + `git fetch upstream/main + git merge upstream/main` |
| 44 | +6. push codes to remote (default: origin/main, you don't have access to upstream/main) |
| 45 | + |
| 46 | + `git push` |
| 47 | + |
| 48 | + |
| 49 | + |
5 | 50 | # Linux Common Command |
6 | 51 | cd - 返回上次的目录 |
7 | 52 |
|
@@ -1027,46 +1072,3 @@ export PYTHONPATH=$PYTHONPATH:$(pwd) |
1027 | 1072 | ``` |
1028 | 1073 |
|
1029 | 1074 |
|
1030 | | -### Create a pull request in command line |
1031 | | -``` |
1032 | | -git checkout -b new-feature-branch |
1033 | | -git add . |
1034 | | -git commit -m "A descriptive message about your changes" |
1035 | | -git push origin new-feature-branch |
1036 | | -``` |
1037 | | - |
1038 | | - |
1039 | | -### solve push conflicts |
1040 | | - git pull |
1041 | | - |
1042 | | - git config pull.rebase false |
1043 | | - git reset --hard HEAD~1 |
1044 | | - |
1045 | | -### cooperation on GitHub (submodule) |
1046 | | -``` |
1047 | | -1. get the newest update from the original project |
1048 | | -2. push your own codes even without permission |
1049 | | -``` |
1050 | | - |
1051 | | - |
1052 | | -1. fork the desired project. |
1053 | | -2. clone the fork into your local repo |
1054 | | - |
1055 | | - `git clone https://github.com/MitchellX/flash-attention.git` |
1056 | | - |
1057 | | -4. add the original repo as upstream, so that you can pull the newest changes |
1058 | | - |
1059 | | - `git remote add upstream https://github.com/Dao-AILab/flash-attention.git` |
1060 | | -6. see the remote choices |
1061 | | - |
1062 | | - `git remote -v` |
1063 | | -8. get the newest changes |
1064 | | - |
1065 | | - `git pull upstream/main` |
1066 | | - or |
1067 | | - |
1068 | | - `git fetch upstream/main + git merge upstream/main` |
1069 | | -10. push codes to remote (default: origin/main, you don't have access to upstream/main) |
1070 | | - |
1071 | | - `git push` |
1072 | | - |
|
0 commit comments