Command for git
Step 1:- We have three branches:-
Master
feature-a
feature-b
Now we are in the Master branch.
Step 2:- How to change the branch Master to Feature
git checkout feature-a
Step 3:- How to merge the branch Feature-a to Master
Now we are in the feature branch so we have changed the branch
- git checkout master
Now we are in the master branch
- git merge feature-a
Step 3:- How to create and switch the branch
Now we are in the Master branch so switch and create the branch.
- git checkout -b feature-c
Step 4:- How to check git all commit
- git log --oneline
Step 5:- How do I connect a local folder to an existing github repo?
- git init
- git add .
- git commit -m "First commit"
- git remote add origin <Remote repository URL>
# Verifies the new remote URL
- git remote -v
- git push origin master
How do I resolve git saying "Commit your changes or stash them before you can merge"?
Step2:- Run the following command for view diff for a commit id (0040d2082dc58b015267eb7c5b29583873200ed3).
No comments:
Post a Comment
If you have any problem please let me know.