Repository files navigation
git init - intialize git in folder
git status - status of git repo ( practice )
git add (filename) - stage the file
git commit (filename) - commiting the file (performance)
git rm --cached (filename) - removing staged file
git restore (filename) - deleting new version of the git file
git diff - shows the difference between current and previous version
git log - shows the list of commitments
git diff (commit_hash) (commit_hash) - diff between two commits
git remote add origin https://github.com/(gitHubUserName)/(repositoryName).git - origin is the path where the remote repo points
git branch -M main - convert the current git branch to main branch
git push -u origin main - push the repositories in current main branch
git clone https://github.com/(gitHubUserName)/(repositoryName).git -clones all github repoitory files to your pc
git pull --rebase origin main - pulls the files from remote repo to local pc with 1 commit ahead
You can’t perform that action at this time.