Git command
SSH ket set up
Using GitBash
3. git config --global user.email johndoe@example.com
5. clip < ~/.ssh/id_ed25519.pub
ssh-add
Then you can ssh
into your server.
in addition, you can see the list of fingerprints of all identities currently added by:
ssh-add -l
The complete guide to SSH keys in GitLab - Spectral (spectralops.io)
Clone a branch
git clone -b <branchname> <remote-repo-url>
Git global setup
git config --global user.name "G Gurmangat" git config --global user.email ""
Create a new repository
git clone git@gitlab. cd rihms touch README.md git add README.md git commit -m "add README" git push -u origin master
Push an existing folder
cd existing_folder
git init
git remote add origin
git add .
git commit -m "Initial commit"
git push -u origin master
Push an existing Git repository
cd existing_repo
git remote rename origin old-origin
git remote add origin
git push -u origin --all
git push -u origin --tags
git init
Step 1. <source folder> git clone git url
step 2. git switch developer
Git pull ,push and merge with master
step 1. commit all the changes to current branch.
step 2. git switch master (switch to master)
step 3. git pull origin master (fetch latest code from master)
step 4. git switch developer
step 5. git merge master
while merging if find any conflict , merge manually and accept that.
step 6. git push origin developer (push the changes)
now create a merge request to merge the changes.
git branch - show the branch which are active and your current branch is in Green color.
step 1. commit all the changes to current branch.
step 2. git merge master
while merging if find any conflict , merge manually and accept that.
step 3. git push origin developer (push the changes)
now create a merge request to merge the changes.
Comments
Post a Comment