TEXT   11

github

Guest on 25th November 2021 09:27:02 AM

  1. open git bash
  2. create a folder on desktop using -->mkdir foldername
  3. enter into the folder --> cd folderame
  4. create a text file in the folder --> touch filename.txt
  5. to edit the text fle ---> notepad filename.txt
  6. enter any info in the txt file.save it and close.
  7. create another file using touch command
  8. edit the created file -->notepad filename.txt
  9. edit and save the file
  10. open github and create a new repository
  11. go to git bash and initialize git ---> git init
  12. check the status of the files --> git status
  13. it is in untracked form so use 'git add' to track them --> git add .
  14. check the status again.They are in tracked stage
  15. check configurations and configure them --> git config user.name & git config user.email
  16. now commit them after configuring --> git commit -m "message"
  17. check for git remote if there is any remote it will show the remote name else we need to
  18.  create a remote --> git remote
  19. #every new directory must have a new remote --> git remote add remotename link(frm github)
  20. only after creating the remote we can pull or push the files
  21. push fles using -->git push remote master
  22. select compare & pull request in github
  23. open git bash and --> git branch
  24. --> git branch branchname (for creating new branch)
  25. to switch to the new branch --> git checkout branchname
  26. check for the branch again --> git branch
  27. new branch to previous branch --> git checkout branchname
  28. exit the repository
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35. create a folder changes
  36. mkdir,cd
  37. initialize git     1--> git init
  38. files frm remote repository to local machine --> fetch
  39.                    2---> git fetch link(frm github)
  40. for adding remote  3--> git remote add remotename link
  41.                    4--> git pull remotename master     (pull=fetch+pull)
  42. files added in created folder
  43. inorder to modify  5--> notepad filename.txt
  44. add a line to it and save
  45. after modification to check status 6--> git status
  46. 7--> git add .
  47. 8--> git status
  48. to commit     9 --> git commit -m "message"
  49. 10--> git push origin master
  50. 11--> git log
  51. 12--> git -- oneline

Raw Paste


Login or Register to edit or fork this paste. It's free.