Created
July 25, 2021 10:20
-
-
Save LavizaFalakNaz/425534eb9d8e36dffff2af87d4616ce0 to your computer and use it in GitHub Desktop.
Easy Git commands you should know
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create a new test directory (folder) by entering the following: | |
mkdir git_test | |
Change your location to the newly created directory: | |
cd git_test | |
Configure GitHub Credentials | |
git config ––global user.name “github_username” | |
git config ––global user.email “email_address” | |
Clone a GitHub Repository | |
git clone <em>repository_url</em> | |
List Remote Repositories | |
cd git_project | |
list the remote repositories: | |
git remote –v | |
Pushing Local Files to the Remote Repository | |
1. For example, create a new text file by entering the following into your PowerShell window: | |
new-item text.txt | |
2. Confirmation that the new file is created. | |
Create new text file in Windows PowerShell. | |
3. Now check the status of your new Git branch and untracked files: | |
git status | |
4. Add your new file to the local project: | |
git add text.txt | |
5. Run git status again to make sure the text.txt file has been added. Next, commit the changes to the local project: | |
git commit –m “Sample 1” | |
6. Finally, push the changes to the remote GitHub repository: | |
git push | |
You may need to enter your username and password for GitHub. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi I am getting error while running the application.
Could you please provide complete source code to me.
my email id: krishna.jb@gmail.com