# 2019-08-08-zsh-git-commands

## *ggpush*

is equivalent to

```
git push origin currentBranch
```

## *ggpull*

is equivalent to

```
git pull origin currentBranch
```

## *ggpull someBranch*

is equivalent to

```
git pull origin someBranch
```

It pulls `someBranch` to and merges to local `currentBranch`.

## *gco someBranch*

is equivalent to

```
git checkout someBranch
```

## *gco .*

is equivalent to

```
git checkout .
```

* It checkouts latest commit in current branch.
* It is used to undo/remove your local changes.
* Warning: all your local changes would be lost.

## *gd*

is equivalent to

```
git diff
```

* To show current changes in terminal.

## *gd someRevNo / gd someBranch*

* To show difference between current head and given reference

## *gcb someNewBranch*

is equivalent to

```
git checkout branch someNewBranch
```

* I use it to create a new branch

## *gcl someRepoURL*

is equivalent to

```
git clone someRepoURL
```

* To clone repository locally

## *gaa*

is equivalent to

```
git add --all
```

## *gcmsg someText*

is equivalent to

```
git commit -m someText
```

## *glog*

is equivalent to

```
git log --oneline --decorate --graph
```

* To see logs of commit with lines

## *gss*

is equivalent to

```
git status
```

* To see list of files with changes

## *gcam someMessage*

is equivalent to

```
git commit -a -m
```

* Add all changes and commit with a message


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sagar-r-kothari.gitbook.io/blog/_posts/2019-08-08-zsh-git-commands.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
