Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
Xcache singularity LRZ
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ETP Computing
Xcache singularity LRZ
Commits
ab75680f
Commit
ab75680f
authored
3 years ago
by
Nikolai Hartmann
Browse files
Options
Downloads
Patches
Plain Diff
add instructions for git setup in README
parent
f0e341f6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+48
-0
48 additions, 0 deletions
README.md
with
48 additions
and
0 deletions
README.md
+
48
−
0
View file @
ab75680f
...
...
@@ -72,3 +72,51 @@ create with
baseproxy=$HOME/.globus/base.proxy
grid-proxy-init -cert usercert.pem -key userkey.pem -out $baseproxy -valid 10000:00
```
# Setup git directory on server and push changes
```
mkdir git-config
cd git-config
git init
git config receive.denyCurrentBranch updateInstead
```
Then locally add remote and push to server, e.g. (assuming xcache1 is in ssh config)
```
git remote add xcache1 xcache1:git-config
git push xcache1 <branch-name>
```
If the pushed branch is checked out on the server and there are no untracked
changes this will update the files on the server.
On the server, set the worktree to
`/`
```
# optionally check out branch, if not default
git checkout <branch-name>
# set worktree to /
git config core.worktree /
# don't track README on the server
git update-index --assume-unchanged /README.md
# clear files, except .git
rm -r *
```
From now on, pushes to the server will update files in-place (if there are no
untracked modifications).
Check status on server, ignoring untracked files
```
git status -uno
```
Optionally one can commit on the server and pull the changes down to the local
repository. But for that one needs to configure a user name and email (can only be one at at time).
```
git config user.name "<user-name>"
git config user.email "<user-email>"
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment