Package io.github.andreyzebin.gitSql.git
Class AbstractClient
java.lang.Object
io.github.andreyzebin.gitSql.git.AbstractClient
- All Implemented Interfaces:
Branches,GitAPI,GitDirectory,Origins,Versions,AutoCloseable
- Direct Known Subclasses:
CommitSource,DirOriginSource,LocalSource,RemoteOrigin
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final StringBufferprotected final io.github.zebin.javabash.process.TextTerminal -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractClient(io.github.zebin.javabash.process.TextTerminal term) -
Method Summary
Modifier and TypeMethodDescriptionvoidcommit()booleanvoidfetch()getChanges(String hashFrom) getChanges(String hashFrom, String hashTo) io.github.zebin.javabash.sandbox.DirectoryTreegetUpstream(String local) Fast-forwardvoidpull()voidpush()voidreset()Fast-forwardvoidgit checkout -b another_branch origin/another_branch; git branch -u origin/another_branch.voidvoidsetUpstream(String localBranch, String upstream) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.AutoCloseable
closeMethods inherited from interface io.github.andreyzebin.gitSql.git.GitDirectory
getLocation, getRoot
-
Field Details
-
term
protected final io.github.zebin.javabash.process.TextTerminal term -
stage
-
-
Constructor Details
-
AbstractClient
protected AbstractClient(io.github.zebin.javabash.process.TextTerminal term)
-
-
Method Details
-
seek
Fast-forward -
reset
public void reset() -
listCommits
Fast-forward- Specified by:
listCommitsin interfaceVersions
-
listBranches
- Specified by:
listBranchesin interfaceBranches
-
contains
-
getChanges
- Specified by:
getChangesin interfaceVersions
-
getChanges
- Specified by:
getChangesin interfaceVersions
-
getTimestamp
- Specified by:
getTimestampin interfaceVersions
-
pull
public void pull() -
push
public void push() -
setOrigin
-
getOrigin
-
fetch
public void fetch() -
setUpstream
- Specified by:
setUpstreamin interfaceOrigins
-
getUpstream
- Specified by:
getUpstreamin interfaceOrigins
-
getBranch
-
setBranch
git checkout -b another_branch origin/another_branch; git branch -u origin/another_branch. That's to create another_branch from origin/another_branch and set origin/another_branch as the upstream of another_branch. -
commit
public void commit() -
getDirectory
public io.github.zebin.javabash.sandbox.DirectoryTree getDirectory()
-