├── .github └── documentation.md ├── .gitignore ├── LICENSE ├── animation.svg ├── readme.md └── src └── main.c /.github/documentation.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzunipark/Do-You-Know-GIT/faf7e8d240354a31d2804fd2e18264b7dddd96f0/.github/documentation.md -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 MinJun Park, Miri Park 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /animation.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 45 | 46 |
47 |

Do you know { GIT }

48 |
49 |
50 |
51 |
52 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 |
6 | 7 |
8 | 9 | 10 | 11 | 12 |
13 | 14 | # 15 | 16 | 17 | Github Link 18 | 19 | 20 |
21 |
22 | 23 | Do you know GIT 은 터미널 환경에 익숙해지는 동시에 Git에 대해 학습할 수 있는 프로그램입니다.
24 | 최대한 Debian 계열의 운영체제 느낌이 나도록 디자인 해보았습니다.
25 | 몇몇 명령어는 실제 Linux 운영체제에서 영감을 받아 작성하였습니다.
26 | 27 | ### 💫 Getting Started 28 | ``` 29 | # Clone Project 30 | $ git clone https://github.com/zzunipark/Do-You-Know-GIT.git 31 | 32 | # Run Project 33 | $ cd "folder directory located main.c" && gcc main.c -o main && "folder directory located main.c"main 34 | ``` 35 | 36 | ### 💻 Used Languages 37 | -   Clang 38 | 39 | ### 📄 License 40 | -   MIT License has applied to this repository. 41 | -------------------------------------------------------------------------------- /src/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #define COLOR_RESET "\033[0m" 5 | #define COLOR_GREEN "\033[0;32m" 6 | #define COLOR_ORANGE "\033[0;33m" 7 | #define COLOR_CYAN "\033[0;36m" 8 | #define COLOR_BLUE "\033[0;34m" 9 | #define COLOR_RED "\033[0;31m" 10 | 11 | void run_command(char *input) { 12 | 13 | char* ascii_art ="\n ____ _ ____ ___ _____ ___ \n" 14 | " | _ \\ ___ _ _ ___ _ _ | | ___ __ _____ __ / ___|_ _|_ _|__ \\ \n" 15 | " | | | |/ _ \\ | | | |/ _ \\| | | | | |/ / '_ \\ / _ \\ \\ /\\ / / | | _ | | | | / / \n" 16 | " | |_| | (_) | | |_| | (_) | |_| | | <| | | | (_) \\ V V / | |_| || | | | |_| \n" 17 | " |____/ \\___/ \\__, |\\___/ \\__,_| |_|\\_\\_| |_|\\___/ \\_/\\_/ \\____|___| |_| (_) \n" 18 | " |___/ \n"; 19 | 20 | // help 명령어 21 | 22 | if (strcmp(input, "help") == 0) { 23 | printf("%1000s", ascii_art); 24 | printf( 25 | "\n" 26 | "두유노깃? 터미널 환경에 익숙해지는 동시에 깃에 대해 알게 해드릴게요!\n" 27 | "\n" 28 | "%s[Git] 기타 명령어%s\n" 29 | "%s- git %s[-v | --version]%s | 사용자의 PC에 설치된 git의 버전을 확인할 수 있는 명령어입니다. 더 자세히 알아보려면, 'whatis git -v' 명령어를 입력하세요.\n" 30 | "\n" 31 | "%s[Git] 프로젝트 시작과 관련된 명령어%s\n" 32 | "%s- git init%s | 로컬 컴퓨터에 새 Git 저장소를 생성하는 명령어입니다. 더 자세히 알아보려면, 'whatis git init' 명령어를 입력하세요.\n" 33 | "%s- git clone %s[원격 저장소 URL] [로컬 컴퓨터 디렉토리 (선택사항)]%s | 원격 Git 저장소를 복제하여 지정한 로컬 컴퓨터 디렉토리에 모든 파일과 버전 기록을 저장하는 명령어입니다. 더 자세히 알아보려면, 'whatis git clone' 명령어를 입력하세요.\n" 34 | "\n" 35 | "%s[Git] 기본적인 스냅샷 저장 및 관리 기능과 관련된 명령어%s\n" 36 | "%s- git status%s | 현재 작업 중인 로컬 Git 저장소의 상태를 확인하는 명령어입니다. 더 자세히 알아보려면, 'whatis git status' 명령어를 입력하세요.\n" 37 | "%s- git add %s[로컬 저장소 파일/디렉토리 경로]%s | 파일의 변경 내역을 Staging Area에 추가하는 명령어입니다. 더 자세히 알아보려면, 'whatis git add' 명령어를 입력하세요.\n" 38 | "\n" 39 | "%s[DYKG] 두유노깃 명령어%s\n" 40 | "%s- dykg dictionary %s[페이지]%s | Git과 관련된 용어에 대해 정리한 사전을 불러오는 명령어입니다.\n" 41 | ,COLOR_ORANGE, COLOR_RESET, COLOR_BLUE, COLOR_CYAN, COLOR_RESET, COLOR_ORANGE, COLOR_RESET, COLOR_BLUE, COLOR_RESET, COLOR_BLUE, COLOR_CYAN, COLOR_RESET, COLOR_ORANGE, COLOR_RESET, COLOR_BLUE, COLOR_RESET, COLOR_BLUE, COLOR_CYAN, COLOR_RESET, COLOR_ORANGE, COLOR_RESET, COLOR_BLUE, COLOR_CYAN, COLOR_RESET 42 | ); 43 | } 44 | 45 | // dykg dictionary 페이지 1 명령어 46 | 47 | else if (strcmp(input, "dykg dictionary 1") == 0) { 48 | printf("Git Words Dictionary Page 1\n"); 49 | } 50 | 51 | // dykg dictionary 페이지 2 명령어 52 | 53 | else if (strcmp(input, "dykg dictionary 2") == 0) { 54 | printf("Git Words Dictionary Page 2\n"); 55 | } 56 | 57 | // exit 명령어 58 | 59 | else if (strcmp(input, "exit") == 0) { 60 | printf("Use 'logout' instead.\n"); 61 | } 62 | 63 | // logout 명령어 64 | 65 | else if (strcmp(input, "logout") == 0) { 66 | printf("Bye!\n"); 67 | exit(0); 68 | } 69 | 70 | // 잘못된 명령어 메시지 출력 71 | 72 | else { 73 | printf("DYKG: Command Not Found\n"); 74 | } 75 | } 76 | 77 | int main() { 78 | char input[100]; 79 | 80 | printf("\33c\e[3J"); 81 | printf( 82 | "%sWelcome to Do you know GIT 0.1.1 Alpha%s\n" 83 | "\n" 84 | " * Documentation: %shttps://github.com/zzunipark/Do-You-Know-GIT/blob/main/.github/documentation.md%s\n" 85 | " * Report Issues : %shttps://github.com/zzunipark/Do-You-Know-GIT/issues%s\n" 86 | " * Do you know GIT 0.1.1 Alpha version is an experimental version, and not all features may work perfectly.\n" 87 | " * By using this software, you are considered to have agreed to the MIT License.\n" 88 | "\n" 89 | "Type 'help' for Command List\n" 90 | "\n", COLOR_GREEN, COLOR_RESET, COLOR_ORANGE, COLOR_RESET, COLOR_ORANGE, COLOR_RESET 91 | ); 92 | while (1) { 93 | printf("%sroot@do-you-know-git : %s", COLOR_GREEN, COLOR_RESET); 94 | fgets(input, 100, stdin); 95 | input[strlen(input)-1] = '\0'; 96 | 97 | run_command(input); 98 | } 99 | return 0; 100 | } --------------------------------------------------------------------------------