github repository code example

Example 1: create repository in github using command line

git init
git add somefile
git commit -m "initial commit"
git remote add origin https://github.com/username/new_repo
git push -u origin master 

# New local repository
git init
git add .
git commit -m "Initial commit"

# New remote repository
# Create remote repository (likely on github), then:
git remote add origin https://github.com/username/new_repo #https
git remote add origin [email protected]:username/new_repo #ssh
# Now push
git push -u origin master

Example 2: what is github

GitHub, Inc. is a United States-based global company that provides hosting
for software development version control using Git. In 2018, it became a
subsidiary of Microsoft for US$7.5 billion.

It offers the distributed version control and source code management
functionality of Git, plus its own features.

Example 3: download github repository

git clone https://github.com/username/project-name.git

Example 4: github

GitHub, Inc. is a United States-based global company that provides hosting for software development and version control using Git.

Example 5: github

echo "# practice" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/shlee87/practice.git
git push -u origin master

Example 6: github

mkvirtualenv 

Tags:

Misc Example