├── index.html ├── script.js └── styles.css /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Git Concepts Tutorial 7 | 8 | 9 | 10 |
11 |
12 | 13 | 14 |
15 |
16 |

Git Fundamentals

17 |

Here you can list out the Git concepts and explanations.

18 | 35 |
36 |
37 |

Git Quiz

38 |

Select the correct answers:

39 |
40 | 41 |
42 | Rice = UW
43 | Web browser
44 | File storage
45 | Time machine for code. Track changes, collaborate seamlessly, and undo mistakes in your software projects
46 | 47 | 48 |
49 | A folderrrrregnojwergheojbijgbirje to store files
50 | A place to host a website
51 | A place to manage and store Git projects
52 |
53 | 54 | 55 |
56 | Git clone
57 | Git commit
58 | Git init
59 |
60 | 61 | 62 |
63 | branch_name
64 | Git create branch_name
65 | Git branch branch_name
66 |
67 | 68 | 69 |
70 | Retrieves changes from a remote repository and automatically merges them into the current branch
71 | Pushes changes to a remote repository
72 | Creates a new branch from the current branch
73 |
74 | 75 | 76 |
77 | Git log
78 | Git status
79 | Git diff
80 |
81 | 82 | 83 |
84 | Git log
85 | Git status
86 | Git diff
87 |
88 | 89 | 90 |
91 | be active on zero2sudo on instagram and be active on the gram
92 | beg
93 | slide someone money on the low
94 |
95 | 96 | 97 | 98 |
99 |

100 |
101 |
102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /script.js: -------------------------------------------------------------------------------- 1 | function hideAllTabContentsAndTabStyles() { 2 | const tabContent = document.getElementsByClassName("tabcontent"); 3 | 4 | // On initial load hide all tabContents 5 | for (let i = 0; i < tabContent.length; i++) { 6 | tabContent[i].style.display = "none"; 7 | } 8 | 9 | // On initial load, remove any selected information on the tab 10 | const tabLinks = document.getElementsByClassName("tablink"); 11 | for (let i = 0; i < tabLinks.length; i++) { 12 | tabLinks[i].classList.remove("selected"); 13 | } 14 | 15 | } 16 | 17 | // tabName should be a query param value 18 | function getTabContentIdFromCurrentTabId(tabName) { 19 | if (tabName === 'tab-fundamentals') { 20 | return 'fundamentals'; 21 | } 22 | 23 | if (tabName === 'tab-quiz') { 24 | return 'quiz'; 25 | } 26 | 27 | console.error('Invalid tab query param! Update this function to handle this tab query param: ', tabName); 28 | } 29 | 30 | function displayTabContentAndStyleSelectedTab(tabName) { 31 | document.getElementById(getTabContentIdFromCurrentTabId(tabName)).style.display = "block"; 32 | document.getElementById(tabName).classList.add("selected"); 33 | } 34 | 35 | function handleTabSelection(tabName) { 36 | initializeTab(tabName); 37 | // Save the selected tab in the query parameter 38 | const urlParams = new URLSearchParams(window.location.search); 39 | urlParams.set('tab', tabName); 40 | history.replaceState({}, '', `${location.pathname}?${urlParams}`); 41 | } 42 | 43 | function checkQuiz() { 44 | const correctAnswers = ["a", "c"]; // Replace with the correct answers for each question 45 | 46 | const quizForm = document.forms[0]; 47 | let score = 0; 48 | 49 | for (let i = 0; i < quizForm.elements.length - 1; i++) { 50 | const userAnswer = quizForm.elements[i].value; 51 | if (userAnswer === correctAnswers[i]) { 52 | score++; 53 | } 54 | } 55 | 56 | const quizResult = document.getElementById("quiz-result"); 57 | quizResult.textContent = `You scored ${score} out of ${correctAnswers.length}`; 58 | 59 | return false; // Prevent form submission 60 | } 61 | 62 | function getParameterByName(name) { 63 | const urlParams = new URLSearchParams(window.location.search); 64 | return urlParams.get(name); 65 | } 66 | 67 | function initializeTab(tabParam) { 68 | hideAllTabContentsAndTabStyles(); 69 | displayTabContentAndStyleSelectedTab(tabParam); 70 | } 71 | 72 | document.addEventListener('DOMContentLoaded', () => { 73 | const tabParam = getParameterByName('tab'); 74 | 75 | if (tabParam) { 76 | initializeTab(tabParam); 77 | } else { 78 | // If the tab parameter is not present, set it to 'fundamentals' 79 | history.replaceState({}, '', `${location.pathname}?tab=tab-fundamentals`); 80 | window.location.reload(); 81 | } 82 | }); 83 | -------------------------------------------------------------------------------- /styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: Arial, sans-serif; 3 | } 4 | 5 | #title1 { 6 | color: rgb(92, 71, 32); 7 | } 8 | 9 | .container { 10 | max-width: 800px; 11 | margin: 0 auto; 12 | padding: 20px; 13 | } 14 | 15 | .tabs { 16 | display: flex; 17 | } 18 | 19 | .tablink { 20 | background-color: #f1f1f1; 21 | border: 1px solid #2f1515; 22 | padding: 10px; 23 | flex: 1; 24 | cursor: pointer; 25 | } 26 | 27 | .tablink.selected { 28 | background-color: blue; /* Change to the color of your choice */ 29 | color: white; /* Change to the color that provides good contrast with the background */ 30 | } 31 | 32 | .tabcontent { 33 | display: none; 34 | padding: 10px; 35 | } 36 | 37 | .tabcontent h2 { 38 | margin-top: 0; 39 | } 40 | 41 | .tabcontent ul { 42 | padding-left: 20px; 43 | } 44 | 45 | .tabcontent p { 46 | margin-bottom: 10px; 47 | font-weight: bold; 48 | } 49 | --------------------------------------------------------------------------------