DEV Community

Shreevaishnavi B 24MCR100
Shreevaishnavi B 24MCR100

Posted on • Edited on

GIT/GIT HUB COMMANDS

Image descriptionGit / GitHub Commands
Command 1: Initialize Git on the Local Repositories.

Image description
Setting up Git locally to track changes, collaborate efficiently, and manage project versions from my development environment.
Command 2: Add all changes to the staging area.

Image description
Stage all modified files to prepare them for the next commit, ensuring changes are tracked and ready for version control.
Command 3: Commit all changes with a message.

Image description
Save all staged changes with a meaningful message to document the progress and purpose of the update in version control.
Command 4: Connect the remote repo and the local repo.

Image description
Link the local project to a remote repository to enable pushing, pulling, and syncing code across different environments.
Command 5: Set local branch to main.

Image description
Rename the current branch to β€˜main’ to standardize and align with the default branch used in most remote repositories.

Command 6: Set Configurations in your local git environment.

Image description
Configure the user name and email locally to identify commits and maintain proper authorship in the project history.
Command 7: Push the changes to the remote repo(GitHub).

Image description
Upload committed changes from the local repository to GitHub, ensuring the remote repo is updated with the latest code.

Top comments (0)