10 Essential Git Commands for Setting Up a New Project Efficiently
Step 1: Create folder and open terminal, change directory to the created folder, check files in the folder using this command ls -lpa
Step 2: Execute git init command in the terminal, to initialise git repository. If git is not install please install.
git init
Step 3: Add remote repository
git remote add origin https://git-codecommit.ap-south-1.amazonaws.com/v1/repos/{your_repo_name}
Step 4: Pull updated data from remote repository
git pull origin master
Step 5:
Copy paste code/merge code in recently pulled code
Step 6: Check status of changes, changed files show in red colour
git status
Step 7: Add changes
git add .
Step 7: Check status of changes again, changed files show in green colour
git status
Step 8: Commit code
git commit -m “stable code base”
Step 9: Push code to the remote repository in mater branch
git push origin master
Step 10: Done