DEV Community

loading...

Useful github commands

saifuddinss profile image Saifuddin Slatewala Originally published at 18.236.134.16 on ・1 min read

Github is the most popular version control software. After Microsoft has purchased it, they have made private repositories free. Following are some of the common command which are useful:

install git for mac:

sudo yum install git -y
Enter fullscreen mode Exit fullscreen mode

clone a repository:

git clone _UrlOfGitRepo_
Enter fullscreen mode Exit fullscreen mode

add new files or changes:

git add .
Enter fullscreen mode Exit fullscreen mode

commit new files/changes:

git commit -n "message"
Enter fullscreen mode Exit fullscreen mode

push changes online:

git push
Enter fullscreen mode Exit fullscreen mode

remember username / password:

git config credential.helper store
git push
Enter fullscreen mode Exit fullscreen mode

Discussion (1)

pic
Editor guide
Collapse
patarapolw profile image