Github basics for beginners, Study notes of Computer Science

This is a guide for beginners to Github. Walks through the processes to upload and download through git and also work on same codes.

Typology: Study notes

2020/2021

Uploaded on 02/02/2021

mk2021
mk2021 🇦🇺

1 document

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Git Hub 101
Creating a new repo usin Github and the desktop app
1. Create a repo on github website by creating new project
2. Then right click on green button on right to open in desktop (github
desktopapp)
3. Select a local path (where you want to keep in you local computer)
4. Click clone and the app is now synced up with the repo on github and any
changes you make will show up in the desktop app.
5. Make changes, commit to master and push on the desktop app
6. I can create branch from github too
Creating a new repo using Github and cloning it to local
1. Open http://github.com
2. Go to the top right side of the screen and click on (+) sign to create a
new repository.
3. Click on the new repository and then type the name of the repository
and other details and press on Create repository.
4. Copy the address of your repository
5. Search Gitbash and open
6. Run cd ~
7. Run cd Desktop/
8. Run git clone (place address of your repositry).
9. Run cd (name of your repository).
10. Past your project which you want to upload in the testing folder on a
desktop
11. Run (git status)
12. Run (git add .)
13. Run(git commit -m “write some hint ”)
14. Run (git push origin master).
15. You successfully add your project to GitHub
Creating a new repo using Github and then localising it on the command line:
1. cd <path-to-project-folder>
2. once in the folder, run git init
3. Then run:
git add .
or
git add ____________
4. git commit -m "short descriptive message"
pf2

Partial preview of the text

Download Github basics for beginners and more Study notes Computer Science in PDF only on Docsity!

Git Hub 101 Creating a new repo usin Github and the desktop app

  1. Create a repo on github website by creating new project
  2. Then right click on green button on right to open in desktop (github desktopapp)
  3. Select a local path (where you want to keep in you local computer)
  4. Click clone and the app is now synced up with the repo on github and any changes you make will show up in the desktop app.
  5. Make changes, commit to master and push on the desktop app
  6. I can create branch from github too Creating a new repo using Github and cloning it to local
  7. Open http://github.com
  8. Go to the top right side of the screen and click on (+) sign to create a new repository.
  9. Click on the new repository and then type the name of the repository and other details and press on Create repository.
  10. Copy the address of your repository
  11. Search Gitbash and open
  12. Run cd ~
  13. Run cd Desktop/
  14. Run git clone (place address of your repositry ).
  15. Run cd (name of your repository).
  16. Past your project which you want to upload in the testing folder on a desktop
  17. Run ( git status )
  18. Run ( git add. )
  19. Run( git commit -m “write some hint ” )
  20. Run ( git push origin master ).
  21. You successfully add your project to GitHub Creating a new repo using Github and then localising it on the command line:
  22. cd <path-to-project-folder>
  23. once in the folder, run git init
  24. Then run: git add. or git add ____________
  25. git commit -m "short descriptive message"
  1. git remote add origin https://github.com/itswisdomagain/firebase-auth-secure- way.git
  2. git push -u origin master Links: https://medium.com/@itswisdomagain/git-101-introduction-to-git-for-newbies-bb14f6f9fc https://medium.com/@itswisdomagain/github-101-introduction-to-github-for-newbies- efaf46c https://rogerdudler.github.io/git-guide/ PUSHING to the cloud To upload your local changes to the remote repository for the first time, enter the following instruction on your terminal/command prompt: git push -u origin master The keyword origin in this command is the unique identifier of the remote repository you want to send updates to. The unique ID you set earlier, remember? The keyword master indicates the branch in the remote repository you want to push updates to. The default branch is master The flag -u stands for set-upstream. It tells Git that it should remember this remote repository ID and branch name for subsequent pushes. After that first time, you can just use the following command to subsequently push local changes to the remote repository: git push PULLING from the cloud Quite simple really. Just execute the following command in terminal/command prompt: git pull If that doesn’t work out of the box, try: git pull origin master git init git status Git commit/add