-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgit
20 lines (13 loc) · 861 Bytes
/
git
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Git Commits
A commit in a git repository records a snapshot of all the files in your directory. It's like a giant copy and paste, but even better!
Git wants to keep commits as lightweight as possible though, so it doesn't just blindly copy the entire directory every time you commit. It can (when possible) compress a commit as a set of changes, or a "delta", from one version of the repository to the next.
$ git commit
Git branches
git branch branch_name
Git clone- Its used to download a remote repository in your pc
$ git clone
Git pull - Its a command which is a combination of git fetch and git merge.
$ git pull
Git push- Used to push changes to remote
Always needed to update local repo before pushing, so that no incorrect commit histories exist.
Pull requests- They are used to request a master to pull changes from branch of a forked repo.