testing the git different config
git status
git add . git commit -m "Testing the Commit" git push
git rm --cached -r testing_folder git rm --cached filename.txt git commit -m "Need to commit" git push
Certainly! Here are some basic Git commands that you might find useful:
-
git init: Initializes a new Git repository in the current directory.
git init
-
git clone: Creates a copy of a remote repository on your local machine.
git clone <repository_url>
-
git add: Adds changes in your working directory to the staging area.
git add <filename>
To add all changes:
git add .
-
git commit: Commits changes from the staging area to the repository.
git commit -m "Your commit message"
-
git status: Shows the status of changes as untracked, modified, or staged.
git status
-
git pull: Fetches changes from a remote repository and merges them into the current branch.
git pull
-
git push: Pushes changes from your local repository to a remote repository.
git push origin <branch_name>
-
git branch: Lists existing branches or creates a new branch.
git branch
To create a new branch:
git branch <branch_name>
-
git checkout: Switches to a different branch.
git checkout <branch_name>
To create and switch to a new branch:
git checkout -b <new_branch_name>
-
git merge: Merges changes from one branch into another.
git merge <branch_name>
-
git log: Shows a log of commits.
git log
-
git remote: Shows a list of remote repositories.
git remote -v
-
To Create a branch:To Create a branch.
git branch <branch-name>
-
To switch to a branch:To switch to a branch
git checkout <branch-name>
-
To delete a branch:To delete a branch.
git branch -d <branch-name>
These are just some of the basic Git commands. Git has a rich set of features, so depending on your workflow, you might need additional commands and options. Don't forget to check the Git documentation for more details and options for each command.
https://stackoverflow.com/questions/9529497/what-is-origin-in-git
git remote show origin
git remote rename origin TEST_REPO
git init - initializes a new git repository
git add - adds files to the index
git commit - commits changes to the index
git status - shows the status of the working tree and the index
git log - shows the history of commits
git branch - creates and lists branches
git checkout - switches to a branch
git merge - merges two branches
git pull - fetches changes from a remote repository and merges them into the current branch
git push - pushes changes from the current branch to a remote repository