{"id":16556255,"url":"https://github.com/nathancy/ee205_examples","last_synced_at":"2026-05-29T21:31:09.870Z","repository":{"id":139600091,"uuid":"119616090","full_name":"nathancy/EE205_Examples","owner":"nathancy","description":"EE205 Undergradute TA materials - Object oriented programming in C++ examples, Vim shortcuts, and GitHub commands","archived":false,"fork":false,"pushed_at":"2018-04-04T01:20:36.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-15T07:27:13.542Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nathancy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-31T01:15:04.000Z","updated_at":"2018-05-31T09:06:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"6496b20e-5bed-4f60-9fb9-8f039aeaacf9","html_url":"https://github.com/nathancy/EE205_Examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathancy%2FEE205_Examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathancy%2FEE205_Examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathancy%2FEE205_Examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathancy%2FEE205_Examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nathancy","download_url":"https://codeload.github.com/nathancy/EE205_Examples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241928940,"owners_count":20043906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T20:03:58.410Z","updated_at":"2026-05-29T21:31:09.864Z","avatar_url":"https://github.com/nathancy.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Commands\nGit is a type of Version Control System (VCS) that helps developers to work together and maintain a complete history of their work.\n\nListed below are the functions of a VCS:\n\n* Allows developers to work simultaneously.\n* Does not allow overwriting each other’s changes.\n* Maintains a history of every version.\n\nGit allows groups of people to work on the same documents (often code) at the same time, and without stepping on each other's toes. It's a distributed version control system.\n\nTo clone a remote repository\n```\ngit clone \u003crepo-link\u003e\n```\n\nTo check what branch you're on:\n```\ngit branch\n```\n\nTo check all branches on repo:\n```\ngit branch -r\n```\n\nTo make new branch:\n```\ngit branch \u003cbranchname\u003e\n```\n\nTo switch to branch:\n```\ngit checkout \u003cbranchname\u003e\n```\n\nTo get new changes:\n```\ngit fetch --all\n```\n\nTo check differences between last commit and current changes:\n```\ngit diff \u003cfilename\u003e\n```\n\nTo get changes from GitHub to local\n```\ngit pull origin \u003cbranchname\u003e\n```\n\nTo rebase changes from master onto your branch. Get latest updates while still working on your branch. Normally ONLY DO THIS WHEN YOU JUST DO FRESH COMMIT ON YOUR BRANCH. Otherwise you will get merge errors. \n```\ngit fetch --all\ngit checkout master\ngit pull origin master\ngit checkout \u003cyour_branch\u003e\ngit rebase origin/master\n```\n\nIf you get merge errors, follow the special command down there and above steps again.\n\nTo view commit history\n```\ngit log\n```\n\n## To upload changes to your branch on GitHub\n\nStep 1 (Add files)\n```\ngit add \u003cfilenames\u003e\n```\n\nStep 2 (Check to ensure the files are correct)\n```\ngit status\n```\n\nStep 3 (Commit files to history)\n```\ngit commit -m \"Add message here\"\n```\n\nStep 4 (Push to branch)\n```\ngit push origin \u003cbranchname\u003e\n```\n\n## To merge changes from branch into master branch \n\nGo on GitHub and submit a pull request\n\n## To merge changes from master into your working branch\n\nMAKE SURE you are on your branch (do git branch to make sure)\n\n```\ngit merge master\n```\n\n## To avoid having to enter credentials every time (enter both commands)\n\n```\ngit config credential.helper store\n``` \n\nthen enter this:\n\n```\ngit config --global credential.helper 'cache --timeout 7200000000000'\n```\n\n## Special commands (BE CAREFUL)\n\nTo reset EVERYTHING inside the entire project back to the latest commit. VERY VERY useful when you try to do some experiment and you screw up the project. It's like system restore for github project. BE VERY CAREFUL WHEN USING IT. IT WILL WIPE PERMANENTLY AND YOU CANNOT REVERT. \n```\ngit reset --hard HEAD\n```\n\n# Vim Shortcuts\n\n### Editing Text\nEnter insert mode to type text\n```\ni\n```\n\nEnter insert mode at end of current line\n```\nA\n```\n\nEnter insert mode at beginning of current line\n```\nI\n```\n\nBegining a new line below the cursor\n```\no\n```\n\nReplace current character\n```\nr + \u003cdesired character\u003e\n```\n\nDelete current line\n```\ndd\n```\n\nDelete next word\n```\ndw\n```\n\nDelete current line and enter insert mode\n```\ncc\n```\n\nDelete character at cursor\n```\nx\n```\n\nDelete to beginning of a line\n```\nd0\n```\n\nDelete to end of a line\n```\nd$\n```\n\n### Movement and Navigation\nGo to top of page\n```\ngg\n```\n\nGo to bottom of page\n```\nG\n```\n\nGo up a character\n```\nk\n```\n\nGo down a character \n```\nj\n```\n\nGo left one character\n```\nh\n```\n\nGo right one character\n```\nl\n```\n\nGo down a page\n```\nctr + f\n```\n\nGo up a page\n```\nctr + b\n```\n\nMove to next word\n```\nw\n```\n\nMove backwards one word\n```\nb\n```\n\nMove cursor to beginning of line\n```\n0\n```\n\nMove cursor to end of line\n```\n$\n```\n\n### Copy-Paste\nCopy current line into buffer\n```\nyy\n```\n\nPaste\n```\np\n```\n\nUndo the last operation\n```\nu\n```\n\nRedo the last undo\n```\nctr + r\n```\n\n### Search\nSearch document for text\n```\n/search_text\n```\n\nMove to next instance of the result from search\n```\nn\n```\n\n### Other\nFormat entire document\n```\ngg=G\n```\n\n### Command Line\nDelete stuff on line\n```\nctr + l\n```\n\nHello additional feature\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnathancy%2Fee205_examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnathancy%2Fee205_examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnathancy%2Fee205_examples/lists"}