Skip to content

Instantly share code, notes, and snippets.

@WasimMemon
Forked from gunjanpatel/git-config.md
Created February 21, 2014 06:02

Revisions

  1. @gunjanpatel gunjanpatel revised this gist Jan 21, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion git-daily.md
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@

    1. For the very first time if you didn't configured remote repository then do it using this command.

    git remote add tasol https://ergunjanpatel@bitbucket.org/tt2014/sample-php-app.git
    git remote add tasol https://<Your-userName>@bitbucket.org/tt2014/sample-php-app.git

    2. Fetch changes from remote repository.

  2. @gunjanpatel gunjanpatel created this gist Jan 21, 2014.
    16 changes: 16 additions & 0 deletions git-config.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    Your name and email address were configured automatically based
    on your username and hostname. Please check that they are accurate.
    You can suppress this message by setting them explicitly:


    ```
    git config --global user.name "Your Name"
    git config --global user.email [email protected]
    ```


    After doing this, you may fix the identity used for this commit with:

    ```
    git commit --amend --reset-author
    ```
    53 changes: 53 additions & 0 deletions git-daily.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,53 @@
    #### For the first time clone your repository in to local linux.

    git clone https://your-local-repo-url/sample-php-app.git

    ## Using Terminal

    1. For the very first time if you didn't configured remote repository then do it using this command.

    git remote add tasol https://[email protected]/tt2014/sample-php-app.git

    2. Fetch changes from remote repository.

    git fetch tasol

    3. Configure local working branch:

    **Informative way**

    git branch <new_local_branch_name> tasol/master
    git checkout <new_local_branch_name>

    **Recommended Way**

    git checkout -b <new_local_branch_name> tasol/master

    _or_

    git merge tasol/master

    4. To Commit local branch

    git commit -a -m "Your commit message"

    5. Push you local branch on your Github Repository.

    git push origin <new_local_branch_name>

    _If you want to push your local branch into new remote branch then_

    git push origin <new_local_branch_name>:<remote_branch_name>


    + **Discard uncommitted changes**

    git checkout -- .

    + **Remove your all local git branches**

    git branch -D `git branch --merged | grep -v \* | xargs`


    _Enjoy GIT with Linux_