ssh -p 51100 team@git.hyperbola.info # the team repo ssh -p 51100 <user>@git.hyperbola.info # your repo
with ssh to team or your repo you can only use 4 commands:
type the command 'make' for example when it says 'Please specify the address of the Git repository' its asking for the folder name
for example 'documentation' is the folder for many repositories like guide.git were i have uploaded my file then it prints Please specify the name of the Git repository:
to create “documentation/guide.git” in the remote repo team or <user>, you cant type:
guide
To create folders in your local machine, open your terminal and type as follow:
mkdir GIT && cd GIT && mkdir team && cd team && mkdir documentation && mkdir hyperbolabsd && mkdir packages && mkdir services && mkdir software
To end up create these folders:
# GIT/team/documentation # GIT/team/hyperbolabsd # GIT/team/packages # GIT/team/services # GIT/team/software
Now go to team/packages:
cd packages
Clone the repositories core and extra:
git clone ssh://<user>@git.hyperbola.info:51100/~git/~team/packages/core.git git clone ssh://<user>@git.hyperbola.info:51100/~git/~team/packages/extra.git
cd (=change directory) into to the extra repository:
cd extra
And create your own branch in team git:
git branch <user> # to create a new branch git checkout <user> # to switch to your branch
Create the files you want to add to extra repository and type:
git add .
git commit -sam "Add your commit comment here"
[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [remote "origin"] url = ssh://<user>@git.hyperbola.info:51100/~git/~team/packages/extra.git fetch = +refs/heads/*:refs/remotes/origin/* pushurl = ssh://team@git.hyperbola.info:51100/~git/~team/packages/extra.git [branch "master"] remote = origin merge = refs/heads/master [branch "<user>"] remote = origin merge = refs/heads/<user>
To push and pull commits type
git push origin <user> # to push commits to your branch git pull origin master # pull commits from the master branch to your branch
To merge commits from master branch
git checkout <user> git merge master
Then you can push to remote master branch
git push # to push commits in the current branch
We countinue with more git commands
git reset --soft HEAD~1 # reverts locally your commits ... however it keeps your modifications git reset --hard HEAD~1 # reverts and removes your latest commit change git reset --hard HEAD~2 # if you have plans to remove more commits (2 in this case), if you didn't push those commits remotely git format-patch -1 # generates a patch of the latest commit git revert $commit_checksum # the best way to avoid piss off the work of the other members
If you would revert this commit → https://git.hyperbola.info:50100/packages/extra.git/commit/?id=85b468a2c03371c4e3550a0ddc529a9df376e6ae
you should run:
git revert 85b468a2c03371c4e3550a0ddc529a9df376e6ae
If it comes from your own branch (not in master, please!) you could run:
git reset --hard HEAD~1 # (for the latest commit) or: git reset --hard HEAD~2 # (for the latest 2 commits), then you could run: git push --force
However, please don't use this command in master, for that reason i'm insisting for each user to create their own branches.
git checkout master # to pull changes from your branch to master, then: git pull --rebase origin <user> git push origin master && git push origin <user> # to push them (in your case)
Remember to push those commits to master and milky-way-v0.4 branches if you consider those ones stable and tested by you first because I will pull them to our build server to build and push to repos. You have your own user repo to make experimental things there. You could use forced commands such as:
git push --force # because it is in fact your own personal repo for experimental reasons.
So, in short, you have 2 ways to push your commits:
Hyperbola Development Team git repository use: Copyright 2021 rachad Copyright 2021 André Silva Copyright 2021 Quiliro Ordóñez GNU Free Documentation License