...
Code Block |
---|
[fphysics@facet-srv01 ~/sgess ]$ mkdir git_work
[fphysics@facet-srv01 ~/sgess ]$ cd git_work
[fphysics@facet-srv01 ~/sgess/git_work ]$ git clone ssh:///afs/slac/g/cd/swe/git/repos/slac/FACET/matlabTNG.git
Initialized empty Git repository in /home/fphysics/sgess/git_work/matlabTNG/.git/
sgess@mcclogin's password:
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (3/3), done.
[fphysics@facet-srv01 ~/sgess/git_work ]$ ls
matlabTNG |
...
Editing a file and pushing the changes
Before you make edits, use 'git pull' to ensure you are editing the most updated version of the repo.
In this example, we will edit the file 'README.md'. Then we use 'git commit' to commit our changes and 'git push' to add them to the master repo:
Working in home workspace on production
Code Block |
---|
[fphysics@facet-srv01 ~/sgess/git_work/matlabTNG ]$ git pull
[fphysics@facet-srv01 ~/sgess/git_work/matlabTNG ]$ vim README.md
[fphysics@facet-srv01 ~/sgess/git_work/matlabTNG ]$ git commit -m "test commit from facet-srv01" README.md
[master c2cb0c2] test commit from facet-srv01
1 files changed, 2 insertions(+), 0 deletions(-)
[fphysics@facet-srv01 ~/sgess/git_work/matlabTNG ]$ git push origin master
sgess@mcclogin's password:
Counting objects: 5, done.
Delta compression using up to 40 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 333 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
To ssh:///afs/slac/g/cd/swe/git/repos/slac/FACET/matlabTNG.git
ffd224e..c2cb0c2 master -> master |
...