Git Commands
Git Commands
15.git remote -v
to check remote repo
16.git branch
to check branch
17.git branch -M "new name of branch"
use to rename git branch
WORKFLOW OF GIT
GitHub repo Clone to local machine Make changes in repo Then use git add
Then use git commit push the code to remote repo.
18.git checkout <branch name>
To navigate to another branch
19.git checkout –b <new branch name>
To create a new branch
20.git branch –d <branch name >
To delete a branch
21.git diff<branch name>
To compare two branches
22.git merge<branch name>
To merge two branches
It let you to tell others about the changes you have pushed to branch in a repository of
GitHub.
An event that take place when git is unable to automatically resolve diffrences in code
between two commits (changes)
UNDOING CHANGES
24.git log
Used to see the history of commits
FORKING IN GITHUB
Forking creates your own copy of a repository in a remote location (for example,
GitHub). Your own copy means that you will be able to contribute changes to your
copy of the repository without affecting the original repository.