Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
SET UP SSH FOR GIT ON LINUX
1
Generate your Public key using ssh-
keygen command and set your
passphrase.
2
Copy the public key from your
system and paste it to your
bitbucket account under ssh key
section.
3
Add the key and now try to clone a
repository using the mentioned
passphrase.
CLONING REPOSITORY AND PUSH
OPERATION
git branch list all the branch
git clone [ repository URL ] Clone an existing repository
git add . Puts current working files into the stage
git commit –m “comment” Commits staged changes to a local branch
git push origin master Uploads changes from all local branches to the
respective remote repositories.
GIT OPERATIONS
git checkout [branch name] - Switch to specified branch
git pull origin [branch name] - fetch the latest changes to the working directory
git checkout –b [branch name] - create a new branch and switched to that
git status - shows the status of operation
git add [./folder/file] - It will add the files to staging
git push origin [branch name] - It will push the changes to the remote repository
git clean –f - delete all changes along with untracked files.
git reset HEAD [file] - to unstage or undoing
git merge -It will merge the changes from other branch to current branch
git log -It will show the logs with commit code
git revert [commit code] - It will undo the changes
git stash - It saves your local modifications away and reverts the working
directory to match the HEAD commit.
git branch –D branch_name - for deleting a branch
WEBHOOKS
Webhooks allow you to
build or set up
integrations, such as
GitHub Apps or OAuth
Apps, which subscribe to
certain events on
GitHub.com.
Webhooks can be used to
update an external issue
tracker, trigger CI builds,
update a backup mirror, or
even deploy to your
production server.
INTERVIEW QUESTIONS
• What is GIT?
• What is a repository in GIT?
• What is the command you can use to write a commit message?
• What is the difference between GIT and SVN?
• What are the advantages of using GIT?
• What language is used in GIT?
• What is the function of 'GIT PUSH' in GIT?
• What is “Staging Area” or “Index” in GIT?
• What is GIT stash?
• What is the function of git clone?
• What is the function of ‘git config’?
• What is the purpose of branching in GIT?
• How can you bring a new feature in the main branch?
• To delete a branch what is the command that is used?
• What is the function of ‘git diff ’ in git?
• What is the function of ‘git checkout’ in git?
• What is the function of ‘git rm’?
• What is the function of ‘git stash apply’?
• What is the use of ‘git log’?
• What is ‘git add’ is used for?
• What is the function of ‘git reset’?
THANK YOU
•Q & A Session

More Related Content

Version control git day03

  • 1. SET UP SSH FOR GIT ON LINUX 1 Generate your Public key using ssh- keygen command and set your passphrase. 2 Copy the public key from your system and paste it to your bitbucket account under ssh key section. 3 Add the key and now try to clone a repository using the mentioned passphrase.
  • 2. CLONING REPOSITORY AND PUSH OPERATION git branch list all the branch git clone [ repository URL ] Clone an existing repository git add . Puts current working files into the stage git commit –m “comment” Commits staged changes to a local branch git push origin master Uploads changes from all local branches to the respective remote repositories.
  • 3. GIT OPERATIONS git checkout [branch name] - Switch to specified branch git pull origin [branch name] - fetch the latest changes to the working directory git checkout –b [branch name] - create a new branch and switched to that git status - shows the status of operation git add [./folder/file] - It will add the files to staging git push origin [branch name] - It will push the changes to the remote repository git clean –f - delete all changes along with untracked files. git reset HEAD [file] - to unstage or undoing
  • 4. git merge -It will merge the changes from other branch to current branch git log -It will show the logs with commit code git revert [commit code] - It will undo the changes git stash - It saves your local modifications away and reverts the working directory to match the HEAD commit. git branch –D branch_name - for deleting a branch
  • 5. WEBHOOKS Webhooks allow you to build or set up integrations, such as GitHub Apps or OAuth Apps, which subscribe to certain events on GitHub.com. Webhooks can be used to update an external issue tracker, trigger CI builds, update a backup mirror, or even deploy to your production server.
  • 6. INTERVIEW QUESTIONS • What is GIT? • What is a repository in GIT? • What is the command you can use to write a commit message? • What is the difference between GIT and SVN? • What are the advantages of using GIT? • What language is used in GIT? • What is the function of 'GIT PUSH' in GIT? • What is “Staging Area” or “Index” in GIT?
  • 7. • What is GIT stash? • What is the function of git clone? • What is the function of ‘git config’? • What is the purpose of branching in GIT? • How can you bring a new feature in the main branch? • To delete a branch what is the command that is used? • What is the function of ‘git diff ’ in git? • What is the function of ‘git checkout’ in git? • What is the function of ‘git rm’? • What is the function of ‘git stash apply’? • What is the use of ‘git log’? • What is ‘git add’ is used for? • What is the function of ‘git reset’?
  • 8. THANK YOU •Q & A Session