Git functions

Mahesh Patel
May 31, 2021

--

Clone a repository to your system

git clone http address of that repository

Now go to that repository folder in your system and make a branch of that so that changes u do in files does not affect main/master branch

cd repository
git branch branch name

Check the all branches exist in that repository

git branch

Switch to branch name branch to work because main will not get affected

git checkout branch name

Change in files that u cloned it will make changes to new branch created not main branch

Check status of changes

git status

Add to git

git add -A(adds all the files in that folder)

Commit the changes

git commit -m “comment for the commit”
git commit -am “comment for the commit”

Check logs

git log

Push Changes

git push origin branch_name

References

(15) GIT: Working with Branches — YouTube

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Mahesh Patel
Mahesh Patel

No responses yet

Write a response