https://github.com/lewiscowles1986/git-protected-branch-test
Sample repo, demonstrating how easy it is to use git under linux to protect a branch
https://github.com/lewiscowles1986/git-protected-branch-test
Last synced: 3 months ago
JSON representation
Sample repo, demonstrating how easy it is to use git under linux to protect a branch
- Host: GitHub
- URL: https://github.com/lewiscowles1986/git-protected-branch-test
- Owner: Lewiscowles1986
- Created: 2023-10-27T05:24:43.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-27T05:25:10.000Z (over 1 year ago)
- Last Synced: 2025-03-24T15:50:31.623Z (3 months ago)
- Language: Dockerfile
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Git Server protected branches
## Setup
You must have the following software installed
- A *NIX shell
- DockerPort 9418 must be free; this is user-bindable
You should have been able to run `docker run hello-world` and have it succeed## Running
Just run the below commands in order from within this repo, using a terminal.
```
docker build -t git-server .
docker run -d --name git-server -p 9418:9418 git-server
git clone git://localhost/test-repo.gitcd test-repo
touch file
git add file
git commit -m "Added file"
git push
git checkout -b new-branch
git push --set-upstream origin new-branch
cd ..rm -rf test-repo
docker rm -f git-server
```