Getting started with Git and Github (the bare minimum).
- https://www.youtube.com/watch?v=SWYqp7iY_Tc
- http://rogerdudler.github.io/git-guide/
- https://services.github.com/on-demand/downloads/github-git-cheat-sheet.pdf
- https://help.github.com/articles/git-and-github-learning-resources/
Recorded Terminal Sessions are stored as .cast files. To play 'em,
- View these .cast videos online at asciinema.org.
- For installing asciinema - installation(apt-get for Ubuntu).
- Open terminal and type - asciinema play filename.cast.
https://help.github.com/articles/set-up-git/
- cd project_folder
- git init - Initializes Local Repo and .git hidden folder appears.
- git add ,rm --cached files - Add files to staging(git add . to add all files).
- git status - Reports files that have modified.
- git commit - Goes to vim,nano editor kind of mode.
Vim - Press I for insert mode and type in commit message. Esc+:wq takes you out.
Nano - Ctrl+X and Enter. - git commit -m "Message" -to skip all the vim,nano stages.
- .gitignore - Folder/Document that contains files to be ignored by git in the repo.
touch .gitignore - Open it and type all filenames which have to be ignored.
- Create repo in github - Try .edu accounts
- git remote add origin 'url' - Add remote repo with 'url' being the 'Clone with HTTPS' on the repo in github.
- git push -u origin master - To push contents from local repo to remote repo
- git pull origin master - To reflect changes made by others contributors on your local repo.
- Create repo in github
- cd project_folder and git init
- git add README.md
- touch .gitignore and add appropriately
- git add .
- git commit -m "First Commit"
- git branch -M main
- git remote add origin https://github.com/Sharan-Sundar/Project.git
- git push -u origin main
- git branch branchname - To create a new branch.
- git checkout branchname - To switch branches.
- git merge branchname - To megre branch with master.
- Make changes in branches and merge finally with the master branch.
- https://stackoverflow.com/questions/927358/how-do-i-undo-the-most-recent-local-commits-in-git
- Reset multiple times if needed - each reset undoes one commit only.