The question is very confusing. You say you have 8 codewords. Then you say you want to find a linear code. What, if any, is the connection between the 8 codewords you have and the linear code you want to find?
Then you say you want to use a $(7,4)$ Hamming code. But a $(7,4)$ Hamming code has 16 codewords, so how does this relate to the 8 codewords you say you have?
Then you say you need to find a generator matrix and a parity check matrix. Do you need these for the $(7,4)$ Hamming code? or is this for the 8 codewords you have?
The only part of the question I feel comfortable answering is, yes, you can find a generator matrix from a parity check matrix. Any good text or notes on coding theory should show you how to do that.
Then in the comments you ask whether there is an easier way than just using $(111000000)$, $(000111000)$, and $(000000111)$. I don't know if there is an easier way, since I can't figure out what you are trying to accomplish (see my first three paragraphs). But you can certainly use those vectors to form the generator matrix for an 8-word, 1-error-correcting linear code and, while there may be better ways, I can't imagine a simpler one.
It seems to me that questions about forming generator matrices and turning parity check matrices into generator matrices were answered in your earlier question, Coding Theory and Generating a matrix.
You can modify the
$$
G=(I|P)\quad \implies \quad H=(-P^T|I)
$$
process as follows, when putting $G$ into reduced row echelon form fails to produce a leading identity block.
- Put an identity matrix block into those columns that won't have a leading one.
- Spread that $-P^T$-block into the remaining columns.
From your generator matrix
$$
G=\left(\begin{array}{ccccc}1& 0& 1& 1& 0\\
0& 1& 2& 1& 0\\
0& 0& 0& 0& 1
\end{array}\right)
$$
the process gives
$$
H=\left(\begin{array}{ccccc}
-1&-2&1&0&-0\\
-1&-1&0&1&-0
\end{array}\right)=\left(\begin{array}{ccccc}
2&1&1&0&0\\
2&2&0&1&0
\end{array}\right).
$$
The form of $H$ on the left has those minus signs in place, but of course we get rid of them in the final answer.
By all means check that the equation $GH^T=0$ holds when you are done.
Best Answer
Some of this is going to depend on what definitions you are using. Hill, A First Course in Coding Theory, page 49, says a generator matrix for a linear code is a matrix whose rows form a basis for the code. With that definition, if you permute the rows of a generator matrix, you do not affect the code, but if you permute the columns then in general you will get a different code.
But you also use the word, "equivalent," in your question. Two codes can be different, but still be equivalent. Indeed, on the next page of Hill, Theorem 5.4 asserts that whether you permute the rows or the columns, you still get an equivalent code.