Skip to content

Commit d62f287

Browse files
authored
Create README.md
1 parent c2df01e commit d62f287

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

README.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,14 @@ Features:
3939
}
4040
```
4141
Or download release jars from https://github.com/scm4j/scm4j-vcs-git/releases
42-
- Create Workspace Home instance providing path to any folder as Workspace Home folder path. This folder will contain repositories folders (if different vcs or repositories are used)
42+
- Code snippet
4343
```java
4444
public static final String WORKSPACE_DIR = System.getProperty("java.io.tmpdir") + "git-workspaces";
45-
...
4645
IVCSWorkspace workspace = new VCSWorkspace(WORKSPACE_DIR);
47-
...
48-
```
49-
- Obtain Repository Workspace from Workspace Home providing a certain Repository's url. The obtained Repository Workspace will represent a folder within Workspace Home dir which will contain all Working Copies relating to the provided VCS Repository
50-
```java
5146
String repoUrl = "https://github.com/MyUser/MyRepo";
5247
IVCSRepositoryWorkspace repoWorkspace = workspace.getVCSRepositoryWorkspace(repoUrl);
53-
```
54-
- Create `GitVCS` instance providing Repository Workspace
55-
```java
5648
IVCS vcs = new GitVCS(repoWorkspace);
49+
vcs.setCredentials("user", "password"); // if necessary
5750
```
5851
- Use methods of `IVCS` interface. See [scm4j-vcs-api](https://github.com/scm4j/scm4j-vcs-api) for details
5952
- Use `vcs.setProxy()` and `vcs.setCredentials()` if necessary

0 commit comments

Comments
 (0)