git clone git@github.com:USERNAME/FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-USERNAME/ORIGINAL-REPO.git
git fetch upstream
You have no files staged yet, but you're sure that all of these you will commit right now. Quick way?
git commit -am "Thou art badass."
You have some files staged, and some not. What will happen if I commit "all" of them?
git commit -am "Thou art badass."
would only commit the staged files.How do I selectively add multiple files to stage using a single command?
git add file1 file2 file3 file4
should do it.git config --list
user.email=ontenth@live.com
user.name=sakshamsaxena
push.default=simple
url.git://.insteadof=https://
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
Git | Hg | SVN |
---|---|---|
Based on C | Based on Python and C | Based on C |
Git thinks of its data more like a set of snapshots of a miniature filesystem | Hg also has snapshot oriented design | SVN only measures the diffs of the files |
Distributed | Distributed | Centralized |
Closures are special objects or functions that refer to independent variables and/or functions defined in a scope. These keep intact the environment in which they were created.
Normally, the local variables within a function only exist for the duration of that function's execution. However, a Closure retains the function as well as the "environment" (variables in that scope). Thus, the existence of that variable will be accounted for if we're using closures.
Closure definitions returns an accessible quantity like an object (in case of module pattern design) or a function (in case of attaching event listeners dynamically).
// Extracted from "https://www.geeksforgeeks.org/must-do-coding-questions-for-companies-like-amazon-microsoft-adobe/" on April 7, 2018 | |
/* How To Use : | |
1. Install Node.js | |
2. Fire up your console and create a fresh directory and enter it. | |
3. Run `npm init -y && npm i superagent cheerio` | |
4. Save this file in that directory. | |
5. Run it with `node GFGExtractor.js` | |
*/ | |
/* | |
Required Modules |
~/Downloads/sublime_text_3
which subl
or which sublime
or whatever you've named it currentlyusing System; | |
namespace DemoApp | |
{ | |
public class Almira | |
{ | |
private Door Door { get; set; } | |
public void LockAlmira() | |
{ | |
this.Door.LockDoor(); |