Creating a Repository on GitHub: ------------------------------------------ 1. Sign in to GitHub 2. Click the "+" sign beside your profile and click "New Repository" 3. Provide repository name and other necessary things if needed. Pushing Code/project folder into GitHub Repository: ------------------------------------------------- 1. Go to the project location on your pc/laptop. 2. Enter into the Project. 3. Right click on mouse and select "Git Bash Here" 4. Run the following commands SEQUENTIALLY - git init git add -A ( add your files ) git status git commit -m "Your Message" ( commit locally ) git remote add origin GITHUB HTTPS PROJECT LINK ...
Head commit : In Git, the commit you are currently on is known as the HEAD commit. In many cases, the most recently made commit is the HEAD commit. To see the HEAD commit, enter: git show HEAD The output of this command will display everything the git log command displays for the HEAD commit, plus all the file changes that were committed. For example: Enter the command to show the HEAD commit. Notice the output. The ghost's most recently added line is in green text. Git Checkout: What if you decide to change the ghost's line in the working directory, but then decide you wanted to discard that change? You could rewrite the line how it was originally, but what if you forgot the exact wording? The command git checkout HEAD filename will restore the file in your working directory to look exactly as it did when you last made a c...