Git  & Github - 4

Git & Github - 4

·

2 min read

Table of contents

No heading

No headings in the article.

Git Stash

it is used to save the current working directory without adding stage and commit

Usually we should commit & push to other branch but in some scenarios we have to push it directly at that time, we can use git stash command to take the back up

To check list git stash list

To create stash git stash sample1

Eg: stash@{1}

stash@{2}

To apply the git backup git stash apply (kindly note it will be applied to the recent one )

If we want a specific one than git stash apply stash@{1}

To remove from stash git stash drop sample1 (sample is a specific one)

to apply and delete git stash pop

git cheery-pick

if one branch we have 4 commits and we want to merge to master then we will get all 4 commit so now we want just one commit then we have cherry-pick

master >git cherry-pick CID

stage>git cherry-pick 0df0vdfv0df0

*stage is a branch name in above command

git fetch - > master branch ->git pull

files error

to give permissions to other apps

go to settings and follow

We will have a errors in the following form

1 . access to repository by owner 403

  1. ssh error

    Shell script to create a ssh keygen

    to create a repo shell script

    token must be generated and added in this place

    pull request

    In remote repo, assume a x y branch then we will use pull request branch which requires a repo) branch has updated a code, and it need to get it in (we will create a pull request from the

    click on pull request

    then we will share the url in stack

fork

it is just like getting a copy to our repo

Branching Strategy

Git rebase

In git merger all commit will be merged as on one commit , but where as in rebase we will be able to see different git rebase different commits merge individually