I’m a fairly new Git user who’s only familiar with basic commands. I’ve cloned a Git repository to a local branch, then used:
git add file.txt
git commit -m 'my message'
git push
So far, this is working fine to commit. Now, I’ve been asked to pull my changes into the remote repository. Since this is the first time I’ve ever done this, I want to do so ‘safely,’ without making any inadvertent changes to the remote repo. I’d also like to review the commits before pulling them so I’m sure I’m pulling in the right ones.
So, I’ll be SSHing into the remote server and pulling the changes I’ve made in my local repository.
What is the best way to do this?
Assuming you have cloned from your remote repo
well you already did that with
If you want to pull little safely from your remote host do first
and later
Lastly to check commits you can do